There are three important and essential commands:
1.
useradd: add a new user
2.
usermod: modify and
existing user
3.
userdel: delete and
existing user
To set a password for a user:
#passwd – use this cmd
Switches:
-l
: locks the account
-u : unlocks the account
-S: shows the status of the account
-e: forces the user to change passwd on
next login
Important files:
/etc/passwd: contains account info, including passwd
/etc/shadow: contains account and password info, but
encrypted
vipw: use
to edit the passwd file
pwck: use to check the integrity of
the passwd file
SUID: sets
the user id of a file/dir – used to
allow users with non-root privs to change files that require root privs.
SGUI: sets the group ID of a
file/dir – same purpose as SUID, but for groups.
Sticky Bit: once set, this prevents a file being
deleted by users even if they have the privs to modify the file.
SUID: 4 u+s
GUID: 2 g+s
Sticky 1 +t
No comments:
Post a Comment