Académique Documents
Professionnel Documents
Culture Documents
:
) id( ) user( ) UID( o
) user( ) id(
)root user( ) UID = 0( o
)system user( ) UID = 1499(
)normal user( ) UID >=500(
: :) user( o
) login( ) nologin shell( )new user( for username in ali mohamed ahmed;
)Login Shell : /sbin/nologin( do
useradd $username;
echo password | passwd --stdin $username ;
) Create a private group for the user( done
) primary group( )keyboard( ) pipe( ) --stdin( :
)hidden by default( ) users( ) primary group(
)Edit Preferences( # passwd <username> (set the user password)
# id (show information for current user)
#id <username> (show information for the specified user)
) group( ) user(
Step GUI tool s Command line tools
2. Add new Group # groupadd <groupname> (Create a new group)
# groupadd -g <GID> <groupname>
(Create a new group with
the specified group id)
:
) append( ) -a(
) user( ) supplementary groups(
# usermod -g <groupname> <username>
(change the primary group for the specified
user)
:
30 ) expiration date(
# date -d +30 days
max days
days
)/etc/shadow( ) passwords(
username : password hash : last password change : min password age : max password age : password warning period : password inactive period : account expiration
note:
o last password change (number of days since 1/1/1970) = date of the last time the password changed
o min password age (in days , 0 = no min age requirement)
o max password age (in days)
o password warning period (in days , 0 = no warning given)
o password inactive period (in days)
o account expiration (number of days since 1/1/1970)
)/etc/group( ) groups(
groupname : password : GroupID : list of users