?
Solved

Red Hat Linux Add User and Group Tutorial

Posted on 2009-07-14
5
Medium Priority
?
2,259 Views
Last Modified: 2013-12-15
I need to add a new user into a Red Hat Linux box.  How would I do this?  I need to give them root privileges to the box - preferable so they can use sudo.  I am comfortable with the command line, but not Linux.

Thanks,
0
Comment
Question by:awakenings
[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
  • 3
5 Comments
 
LVL 29

Accepted Solution

by:
Jan Springer earned 1600 total points
ID: 24850783
groupadd <username>

useradd -d /path/to/homedir/<username> -g <username> -s /bin/bash -m -c 'Free Form Field' <username>

passwd <username>
0
 
LVL 29

Assisted Solution

by:Jan Springer
Jan Springer earned 1600 total points
ID: 24850787
Prefacing each command with "sudo" or su to root.
0
 

Author Comment

by:awakenings
ID: 24852050
Jesper,

     Do I need to create the home directory or does it do it automatically?  I'm guessing the useradd should come before the group add?  How do I add them to a particular group though?

Thanks,

Awakenings
0
 
LVL 29

Assisted Solution

by:Jan Springer
Jan Springer earned 1600 total points
ID: 24852186
No, groupadd comes first so that you can specify it with the useradd command.

The "-m" says to create the home directory specified by "-d".

Put the correct path to the home directory i.e., /home/awakening

I use groups to identify types of accounts:

1001 email
1002 internal
1003 etc

The "-g" is changed to identify the group that you are putting that individual in.
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 400 total points
ID: 24852343
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

764 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