Solved

Command Line User & Root accounts

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

777 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