[Ubuntu Tip] Creating users and groups through command line

Just follow these simple tips to create a new user or group through command line in Ubuntu .

Creating a new user :

You must use the “adduser” command for this . Here you can see that i have created a user named “captain” . You would be prompted to enter your password twice and it wont be displayed as you type it .

adduser

Now to add a new group you use “groupadd” command as follows :

groupadd

here I have created a new group called CaptainFans. ‘ usermod ‘ command is used to change the attributes related to a user . Here we use the -G option with it to include user captain into the group .

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s