Displaying posts categorized under

User and Group Management

How to change user name in Linux

Sometime you may want to change the user login name into different one,In that case you can use two options (Login or switch to root mode – su) Method 1: ( Using usermod command ) usermod -l newname oldname Example #usermod -l anthoniraj antony Here the user antony has been changed to anthoniraj Method 2 [...]

Group Management

1) The “groupadd” command creates a new group account[root@MB327SCS068 ~]# groupadd netadmingroupadd: group netadmin exists[root@MB327SCS068 ~]# groupadd network 2) Adding users into network group[root@MB327SCS068 ~]# useradd antony -g networkuseradd: user antony exists[root@MB327SCS068 ~]# useradd antonyraj -g network[root@MB327SCS068 ~]# useradd ligory -g network[root@MB327SCS068 ~]# useradd basha -g network 3) Setting and changing group password (gpasswd)[root@MB327SCS068 ~]# [...]

Commands for Managing Users

The following commands are used to manage the users on your Linux OS1. useradd – Create a new user or update default new user informationExample :[root@myserver ~]# useradd admin 2. passwd – Used to change the user passwdExample :[root@myserver ~]# passwd adminChanging password for user admin.New UNIX password:Retype new UNIX password:passwd: all authentication tokens updated [...]

Changing User Information

Using ‘chfn’ command (In Redhat EL4) , we can enter the user information, the same thing you can do with GUI mode using ‘userinfo -a ‘ command [root@MB327SCS068 ~]# chfn rootChanging finger information for root.Name [root]: rootOffice [vit]: vitOffice Phone []: 1234567Home Phone []: 1234567 Finger information changed. Using finger command you can view the [...]

Locking and Unlocking User Password

Some times the administrator can lock or unlock the user passwordmeans , the user cannot change the password if administrator set the lock option.the syntax is passwd -l / -u username l – lock the password (user cannot change their password)u – unlock the password (user can change their password) Eg : [root@MB327SCS068 ~]# passwd [...]

Finding All Users and Groups In Linux Machine

We have lot of commands for user management like useradd ,passwd but there is no separate command for finding all users in our Linux machine , But one powerfulcommand is ‘cut’ with some options we can find all users on our system 1) Displaying All users (need root mode) cut -d : -f 1 /etc/passwd [...]