Skip to content

Commit

Permalink
Fixed Typo in setupconfig + Added usersetup
Browse files Browse the repository at this point in the history
The user will now be created with a default shell /bin/bash, a home dir, a password and its real name as description
User groups are missing right now...

Signed-off-by: Marius Messerschmidt <[email protected]>
  • Loading branch information
mame98 committed Sep 26, 2015
1 parent af5a8a0 commit 9122c13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion SetupTools/PostInstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self):
# save font [x]
# Install GRUB2 [x] (might chooseable in future?)
# Installing basic deamons[ ] (config?)
# Create User [x]
# Copy Mirrorlist list.txt[x]
# -----> Soon: Xorg + Configuration

Expand Down Expand Up @@ -76,8 +77,12 @@ def run(setupconfig):
yield "25,Generating Boot Image"
os.system("arch-chroot /mnt mkinitcpio -p linux > /dev/null 2> /dev/null")

yield "28,Creating User"
os.system("arch-chroot /mnt useradd -d " +setupconfig.homedir + " -c \'" +setupconfig.realname +"\' -s /bin/bash -m " +setupconfig.username)
os.system("echo " +setupconfig.username + ":" + setupconfig.password + " >passlist")

yield "30,Setting root password"
os.system("echo root:" + setupconfig.rootpassword + " > passlist")
os.system("echo root:" + setupconfig.rootpassword + " >> passlist")
os.system("arch-chroot /mnt chpasswd < passlist")
os.system("rm passlist") # it is import to clean up the password file

Expand Down
2 changes: 1 addition & 1 deletion SetupTools/SetupConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def setuserdata(self, username, homedir, realname, passwd):
self.username = username
self.homedir = homedir
self.realname = realname
self.passwordd = passwd
self.password = passwd

def setnetwork(self, net):
self.network = net
Expand Down

0 comments on commit 9122c13

Please sign in to comment.