开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜