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 error 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,
or specify a shell:
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.