All of you have been told about group and user management in this tutorial. and learn how to add group and user very easy steps. follow steps carefully and lets try now.
Three type are users in redhat
- Admin user (Root)
- Normal user (Created by manually)
- System user (automatic login by system )
User management
How to user add in redhat
[root@localhost ~]#useradd vishal
How to create password for vishal user
[root@localhost ~]#passwd vishal
How to delete password of any user
[root@localhost ~]#passwd -d vishal
How to delete any user in redhat
[root@localhost ~]#userdel -r vishal
How to check user information in redhat
[root@localhost ~]#cat /etc/passwd
How to check password information in redhat
[root@localhost ~]#cat /etc/shadow
How to check login user information in redhat
[root@localhost ~]#who -a
output
user name / terminal no(tty)/ time date/ login id no.
root tty1 20.02.2020 2242
vishal tty2 20.02.2020 2525
How to kick out login user in redhat
remove vishal user [root@localhost ~]#kill 2525
Group management
How to create a group in redhat
[root@localhost ~]#groupadd guruvishal
How to check group create or not
[root@localhost ~]#cat /etc/group
How to delete a group in redhat
[root@localhost ~]# groupdel guruvishal
How to add user in group
[root@localhost ~]# usermod -G guruvishal vishal
How to remove user in group
[root@localhost ~]# gpasswd -d vishal guruvishal
( d – for delete )