I think the
useradd -p expects the password to be encrypted.
man useradd:
Code:
-p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to disable the
password.
Note: This option is not recommended because the password (or encrypted password) will
be visible by users listing the processes.
You should make sure the password respects the system's password policy.
So you should encrypt the passwords before passing them to
useradd.
Alternatively, you may use the
chpasswd utility to set the passwords after creating the user accounts.
edit:
Quote:
Originally Posted by Mike0
Also, the users home folders get with them a bonus folder named "Examples" and three config files. I need to use the correct -argument in the useradd command for not having these "bonus" folders, I want the home folder to be empty, only with the manualy added "gradiva" folder which I added with mkdir.
|
man useradd:
Code:
-m, --create-home
Create the user's home directory if it does not exist. The files and directories
contained in the skeleton directory (which can be defined with the -k option) will be
copied to the home directory.
[...]
-k, --skel SKEL_DIR
The skeleton directory, which contains files and directories to be copied in the
user's home directory, when the home directory is created by useradd.
This option is only valid if the -m (or --create-home) option is specified.
If this option is not set, the skeleton directory is defined by the SKEL variable in
/etc/default/useradd or, by default, /etc/skel.