Linux Adminitstration (8)

Users and Group


This article is about objectives 2.0 of comptia linux+, security section dealt with users and groups utilities. The section alos included with the utilities of
default shell, configuration and account management.

Learning Objectives::
  + Account Creation and Deletion
  + Default shell
  + Configuration files
  + Account management


Commands::

													useradd    
													groupadd
													userdel
													groupdel
													usermod
													groupmod
													id
													who 
													passwd
												


X.X Looking who is logged on and what they are doing
w displays information about the users currently on the machine, and their processes.

03:15:18 up 1:47, 7 users, load average: 0.51, 0.88, 1.03
[current time, system running time, number of users, system load averages for past 1, 5, and 15 min]
[
User -- username
TTY -- tty name
LOGIN@ -- login time
IDLE -- idle time
JCPU -- time used by all processes attached to the tty. It doesn't include past background jobs, but does include currently running background jobs.
PCPU -- time used by the current process, named in the "what" field.
WHAT -- command running
]

											$	w 

											
												03:15:18 up  1:47,  7 users,  load average: 0.51, 0.88, 1.03
												USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
												RHHLab   tty2      01:28    1:46m  0.12s  0.12s /usr/bin/startplasma-wayland
												RHHLab   pts/0     01:28    1:46m  0.00s  1.49s /usr/bin/kded5
												RHHLab   pts/1     01:28    1:40m  1.66s  1.53s /usr/bin/zsh
												RHHLab   pts/2     01:35    1:34m  2.84s  2.34s /home/RHHLab/anaconda3/bin/pyth
												RHHLab   pts/3     01:35   53.00s  1.95s  1.78s /usr/bin/zsh
												RHHLab   pts/4     01:35    1:40m  0.65s  0.53s /usr/bin/zsh
												RHHLab   pts/5     01:35    1:40m  0.63s  0.52s /usr/bin/zsh
											


2.2 Super User
There are three types of users in linux system::
  . super user [root]
  . standard user
  . service user [e.g http, crond]
Giving least privilege, the access on needed the system will remain secure !! [best practice]

Super user is root user that controls everything in linux system. Booting in root user is not a good idea, when the reponsible person
don't know what he is doing or what to type. It is also a bad habit regardless of their expertise, a single mistake can break the system.
That dosen't mean linux is unstable, hell no! It's a good habit to be 100% sure that your change will not break the system, even if it did,
you can fix it later easily.

log in as root user:

												su --root

												#switch user/ superuser [su]

											


Sudoers file::
sudoers file contains all the user information and userlist in /etc/sudoers
visudo command should be used to change /etc/sudoers file. It is recommended to not touch the file untill needed!












© Copyright © All rights reserved | Rakib H. Hridoy