When useradd command executed, it takes some of user property values form a file called /user/default/useradd from where it gets the following values:
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
|
Description : -
1. GROUP: Maximum number of groups for which a user can be a member of.
2. HOME : Directory where the user's home directory will be created.
3. INACTIVE: Number of days the account should be inactive after creation.
Note: "-1" means never inactive i.e. always active
4. EXPIRE: Date on which the account should expire. It is given in the form YYYY-MM-DD.
5. SHELL: Default login shell for the user.
6. SKEL: Directory from where the default user profile files will be copied to the user's home directory.
7. CREATE_MAIL_SPOOL: This option ensures that a new user will have a directory of its user name in /var/main where the mail process can store mail messages.
2. HOME : Directory where the user's home directory will be created.
3. INACTIVE: Number of days the account should be inactive after creation.
Note: "-1" means never inactive i.e. always active
4. EXPIRE: Date on which the account should expire. It is given in the form YYYY-MM-DD.
5. SHELL: Default login shell for the user.
6. SKEL: Directory from where the default user profile files will be copied to the user's home directory.
7. CREATE_MAIL_SPOOL: This option ensures that a new user will have a directory of its user name in /var/main where the mail process can store mail messages.
By editing this file from command line, you can change the default shell and directory containing home directories for new users on Linux Operating System.
great.!!
ReplyDeleteIn group.. Is it maximum no of group a user can be member of? Because I heard it is 16
ReplyDeletehow to change the userid
ReplyDeleteUsermod -u id username
DeleteIf you want create customized uid
useradd -u id username
difference between userdel and userdel -R
ReplyDeleteIf you delete the user by command userdel ,the user information removed in /etc/passwd but the user info still available in /home directory. Userdel -R username it will delete recursively
Deleteby using the userdel -R it will delete the user home directory also
ReplyDeleteIf a user becomes inactive by setting values in inactive attributes then how to bring back the inactive user to active kindly someone help me
ReplyDelete