2007 Feb 2

Common Linux User Commands

Here are common linux command examplers for managing user accounts.

Displaying user details
Syntax: id {username}
shell> id tildemark

Create a new user with username tildemark
Syntax: useradd {username}
shell> useradd tildemark

Create a new user with username tildemark under group admin
Syntax: useradd -g {group} {username}
shell> useradd -g admin tildemark

Creating a new user with username tildemark and assign a home folder
Syntax: useradd -d {location} {user}
shell> useradd -d /home/tildemark tildemark

Creating a new user tildemark and assigning a password pass
Syntax: useradd -p {password} {username}
shell> useradd -p pass tildemark

assigning password to user tildemark
Syntax: passwd {username}
shell> passwd tildemark

Creating a new group
Syntax: groupadd {group}
shell> groupadd developers

Creating a new user and assigning it multiple groups admin, developers
Syntax: useradd -G {group1}, {group2} {,...}
shell> useradd -G admin, developers

Assigning user tildemark to group admin, developers
Syntax: usermod -G admin, developers tildemark

Delete an existing user
Syntax: userdel {username}
shell> userdel tildemark

0 TrackBacks

Listed below are links to blogs that reference this entry: Common Linux User Commands.

TrackBack URL for this entry: http://www.tildemark.com/cgi-bin/mt4/mt-tb.cgi/53

Leave a comment

About this Entry

This page contains a single entry by tildemark published on February 2, 2007 10:10 AM.

Loading doskey automatically with CMD was the previous entry in this blog.

SEO Challenge is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Recent Activity

Friday

  • tildemark tweeted, "im so sleepy. Zzzzzzzz"

Sunday

  • tildemark tweeted, "some of my scipts are not working with godaddy. but works fine on the others. not mention their poorly coded admin page"

Today

  • tildemark tweeted, "so many pending tasks i need to finish. need more coffee !!!"
  • tildemark tweeted, "@gmtristan i dont think that is true."

Today

  • tildemark tweeted, "how does godaddy subdomain behaves? i have some problems with it on my scripts. it does not seem to accept query strings.."

Monday

  • tildemark tweeted, "i had a hard time removing the error messages generated by surf side kick. i ended up uninstalling most of my applications."

Sunday

  • tildemark tweeted, "i got hit by surf side kick and im getting numerous error messages on my screen. tskkkkk"

Saturday

  • tildemark tweeted, "check boxes, i didn't know they can also be complex"
  • tildemark tweeted, "this smart bro internet speed is depressing, i thinking of filling a complaint to the DTI next week."

Friday

  • tildemark tweeted, "the seminar turned out to be leadership training. it was fun, learned alot. i have already attended numerous seminars but this is different."