I definitely know how to add a user account into the unix system, the simplest one being :
#useradd -m [username],
and more complex one, being the ability to add user groups, etc to the user, e.g :
#useradd -g guests -G www,accounting -d /home/guestuser -s /usr/bin/bash3 -m guestuser
g here is the primary group where the user will belong to, &
G is the secondary group
d is the home directory the user will belong to
s is the shell path
I managed to get some lines for user adding using python :
-------------------------------------------------------------------
import os
import crypt
>>>username = raw_input ("Please enter username : ")
>>>password = raw_input ("Please enter password : ")
os.system ("useradd -p "'+crypt.crypt (password, "22")+" "+username)
-------------------------------------------------------------------
Is this correct? Is there anything else that I have to add/modify in the script??
