Is there any option to add a user in single line. it includes the password. Dont prompt anything.
OS=RHEL 5.5
|
|
|
You can use
You may want to exclude this from your history, though, if you are using a plaintext password in the command. You can prepend a space before the command to exclude it from history. If you are running this command on a lot of machines, you may just want to generate the password once and use it in the command directly:
|
|||
|
|
|
You should be able to use something like this:
|
|||
|
|
|
It looks that
Your system-wide default password encryption method is set in /etc/login.defs in variable ENCRYPT_METHOD. |
|||
|
|
|
useradd -u <uid> -G <group> -d /home/<user home dir> -p password -m -u for UID Well there are many more options depending on the flavour of linux. |
||||
|
|