Solved

Command Line User & Root accounts

Posted on 2003-12-04
4
2,074 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

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

Accepted Solution

by:
majorwoo earned 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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…

717 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