[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Command Line User & Root accounts

Posted on 2003-12-04
4
Medium Priority
?
2,079 Views
Last Modified: 2010-04-21
What is the syntax for adding generic users and Root access users accounts at the command line?
0
Comment
Question by:CMILLER
  • 2
  • 2
4 Comments
 

Author Comment

by:CMILLER
ID: 9876617
Please explain the switches
0
 
LVL 9

Accepted Solution

by:
majorwoo earned 1000 total points
ID: 9876970
man useradd

will tell you what you need to know, the most common are:

-d home_directory
-g initial_group
-G other, groups
-s login_shell
-u UID

so something like

useradd -d /home/majorwoo -g staff -G users -s /bin/bash -u 507 josh

will add a user, account name josh with a home directory of /home/majorwoo whose main group is staff but is also a part of users and whose UID is 507

using the -p to specify the password is not worth it(you have to crypt it first), after making the account use
passwd username

to set the password
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 9876980
to add a root user, add the user above as normal, and configure sudo to give them permissions

for example to create the same user above josh, and give him full root permissions add the following to /etc/sudoers

josh    ALL=(ALL) ALL
0
 

Author Comment

by:CMILLER
ID: 9877213
Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month19 days, 13 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question