User Adminstration
Overview
● Purpose of user administration
● Types of user accounts
● Adding , Modifying and deleting user accounts.
● User related configuration files
● Giving command permission to users through sudo.
● Recovery of User related configuration files.
● There are three basic types of Linux user accounts:
- Administrative account (root)
- Service account - games, ftp, etc...
- Regular account
● Each user account is identified by UID (0 - 60,000)
- administrative (root) - 0
- service accounts – 1 - 499
- Regular accounts – 500 - 60,000
Types of user accounts
Configuration files
1. /etc/passwd
username:x:UID:GID:Full Name:Home_Directory:Shell
2. /etc/shadow
3. /etc/group
4. /etc/gshadow
1. # id -To get uid and gid of a user
2. # useradd [newusername]
3. # passwd [username]
4. # useradd -u [uid] [newusername]
5. # usermod -u [uid] [username]
6. # usermod -g [gid] [username]
7. # su
8. # usermod -s [shell location] [username]
9. # usermod -l [newname] [oldname]
10. # usermod -L [username]
11. # usermod -U [username]
12. # passwd -l [username]
13. # passwd -u [username]
14. # usermod -e [yy-mm-dd] [username]
15. # chage -l [username]

Useradmin

  • 1.
  • 2.
    Overview ● Purpose ofuser administration ● Types of user accounts ● Adding , Modifying and deleting user accounts. ● User related configuration files ● Giving command permission to users through sudo. ● Recovery of User related configuration files.
  • 3.
    ● There arethree basic types of Linux user accounts: - Administrative account (root) - Service account - games, ftp, etc... - Regular account ● Each user account is identified by UID (0 - 60,000) - administrative (root) - 0 - service accounts – 1 - 499 - Regular accounts – 500 - 60,000 Types of user accounts
  • 4.
    Configuration files 1. /etc/passwd username:x:UID:GID:FullName:Home_Directory:Shell 2. /etc/shadow 3. /etc/group 4. /etc/gshadow
  • 5.
    1. # id-To get uid and gid of a user 2. # useradd [newusername] 3. # passwd [username] 4. # useradd -u [uid] [newusername] 5. # usermod -u [uid] [username] 6. # usermod -g [gid] [username] 7. # su
  • 6.
    8. # usermod-s [shell location] [username] 9. # usermod -l [newname] [oldname] 10. # usermod -L [username] 11. # usermod -U [username] 12. # passwd -l [username] 13. # passwd -u [username] 14. # usermod -e [yy-mm-dd] [username] 15. # chage -l [username]