Linux Commands for User and Group

By ongraph
April 18, 2014 | 1122 Views

Latest Industry insights to keep you updated on the latest happenings.

grep ^groupname /etc/group

– List all user of a group

groupadd groupname

– Create new group

groups

– List all groups of the current user

htpasswd -c passwdfile username

– Create password file with username or truncate and rewritten if exists

passwd username

– Change the password of an exiting user

useradd username

– Create user

useradd -m -s /bin/bash username

– Create user with default home folder and bash as default shell

usermod -a -G groupname username

– Add existing user to an existing group

 

Monthly industry insights to keep you updated on latest happenings

Follow us on Twitter
Follow us on Facebook
Follow us on Linkedin