1 / 17

Chapter 9 Managing Users

Chapter 9 Managing Users. Linux users. There are three types of users in linux System users: ? Super user: ? Normal users: ?. Linux users. There are three types of users in linux System users: (they are the software/applications users created

afram
Download Presentation

Chapter 9 Managing Users

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 9Managing Users

  2. Linux users There are three types of users in linux • System users: ? • Super user: ? • Normal users: ?

  3. Linux users There are three types of users in linux • System users: (they are the software/applications users created automatically by the system)e.g mail , MySQL , ftp ….. • Super user: ? • Normal users: ?

  4. Linux users There are three types of users in linux • System users: (they are the software/applications users created automatically by the system)e.g mail , MySQL , ftp ….. • Super user: (the superuser/root user/system administrator is only one, his duties are to install software + create or delete users + look after the system resources ….) the prompt sign of super user is # in all shells . • Normal users: ?

  5. Linux users There are three types of users in linux • System users: (they are the software/applications users created automatically by the system)e.g mail , MySQL , ftp ….. • Super user: (the superuser/root user/system administrator is only one, his duties are to install software + create or delete users + look after the system resources ….) the prompt sign of super user is # in all shells . • Normal users: (the normal users can me many , the powers of normal users are limited but normal user has full powers in his home directory ) the prompt sign of normal users in $ in bourne shell and % in c-shell

  6. Linux users The files which keeps the information of users • The passwd file: (etc/passwd) old method file • User name • Password • User id • Group id • User description • User home directory • User shell

  7. Linux users The files which keeps the information of users • The shadow file: (etc/shadow) new method file, most information is encrypted • User name • Password • User id • Group id • User description • User home dir • User shell

  8. Users and Groups Users name + User idbilal + 501humans can memorize + computer can memorize Group name + group idUsman + 502humans can memorize + computer can memorize

  9. File permissions

  10. File permissions Giving file permissions to files and directories Command -option argument description chmod 777 myfileWill assign read, write and execute permissions to all owner, group and others (rwxrwxrwx) chown -R alimydirIt will change the ownership of the Directory mydir for the user ali, -R option will change ownership of the sub directories residing inside mydir as well. chgrp-R usmanmydirIt will change the group ownership of the directory mydir for the user usman, -R option will change group ownership of the sub directories residing inside mydir as well.

  11. Group Information File The files which keeps the information of group • The group file: (etc/group) • group name • Password • Group id • Assigning password to more then one user chpasswdusername:password chpasswd umar:abc123 usman:ord4446 zahid:sleep7-6 ....:....

  12. Creating and Deleting group Creating a Group • groupaddbilal Removing a Group • groupdelbilal • groupmod(to modify a group) • useradd –G (to create a fresh user and assign him to a group) useradd –G bilalbillygroup You can also create,add and remove groups and users by GUI .

  13. Creating and Removing User Creating a User • useraddbilal Assigning a password to a User • passwdbilal ****** ****** Creating new user and assigning password , shell and id • useraddumar –p abc123 -s /sbin/zsh -u 574 Deleting a user add users home directory as well • userdel –r bilal ‘-r’/home/bilal

  14. Monitoring activities of users • ac • who (will display who are currently logged in and what terminals they are using) Managing Password security • password should be not simple • Password should be not so long • Password should not be written near your pc • Password should not be very difficult • su(will switch to root user, will ask for password before switching ) • subilal(will switch to the user bilal, will ask for bilal password before switching) • suumar(will switch to the user umar, will ask for umar password before switching) Switching users

  15. Granting Root powers to a user on occasion ‘5 minutes default time’ sudo(The user must authenticate himself with the password , list of authorized users is in /etc/sudoers and super user can only access) • First you need to add the user in the file sudoers and assign a password • sudofdisk –l /dev/hda1 (After this the system will ask you for the password, and will match it in the /etc/sudoers/ file) The above command is a system administrator level Command but a normal user will execute it ‘system Disk checking’. Taking back Root powers from a user bash –r (First shift to that user account and type the command)

  16. Users Login Process • Login prompts. • If the user is not root and tries to type wrong password of root then the system will halt and a warning message is issued. • A file /etc/shadow is examined to see if any restrictions are on this particular user. • Password prompts. • User id and Group id being used are set on terminal. • Terminal environment is set. • The home, mail, shell, log is preserved. • The default path of user are set, e.g mail, home etc… • If there are any greeting messages then they are set. • Lastly the user command shell starts.

  17. Disk Quotas • This can be set to both a user and a group . • Quota management is not enabled by default and has to be enabled and configured manually. • Through the vi editor change the file /etc/fstab and set the rules. Gui control panel

More Related