Thursday, 18 December 2014

How to add user and group in Linux

How To Create/Delete User

# adduser harish ( To create user with name )
# passwd harish ( To set password of user )
# userdel harish ( To delete username )

cat /etc/passwd ( Location of user name file )

How to Create/Delete Group

# groupadd hr ( To create group with name )
# groupdel hr  ( To delete group )

cat /etc/group ( Location of group name )

How to add user in Group

# adduser harish hr ( add user in group )
# deluser harish hr ( delete user in group )

cat /etc/group ( Location of group and link with group name )

Note = ls -la ( To check the permission ) 

No comments:

Post a Comment