Solved

Command Line User & Root accounts

Posted on 2003-12-04
4
2,069 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 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now