How to useradd with multiple parameters
I'm trying to use multiple parameters with the useradd command in linux, and I'm not really sure exactly what I should do?? I have tried the following:
useradd -b /home/ -g admin -m -p PASSWD -s USERNAME
Needless to say, it doesn't work. Can anyone tell me the correct syntax to get this working? Thanks, your help is always appreciated!
EDIT: I'm not getting an erro开发者_如何学JAVAr message, It is just returning the flag variables followed by an ng
The -s flag is for specifying the shell.
So either leave the -s flag out,
useradd -b /home/ -g admin -m USERNAME
or specify a shell:
useradd -b /home/ -g admin -m -s /bin/bash USERNAME
PS. Don't specify the password on the command line. It would be visible to other users listing the processes. Moreover, specifying the password this way requires you to enter the encrypted password.
hmmmm maybe the MAN page: useradd
精彩评论