Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

useradd

Posted on 2000-04-01
8
Medium Priority
?
626 Views
Last Modified: 2010-04-20
RedHat 6.1
Why doesn't the useradd command work anymore.
useradd -u 0 -g 0 user
I then add a password. If I try to log in using this my system is screwed up and I can't fix it. Run level 5 no longer works. Run level 3 won't let you log in using this login. I've reloaded several times trying to figure this out. If you use linuxconf it works OK. What is the differance. I can run X if I change the font path in XF86Config. I know xauth is part of the problem. Psudo passwords are also part of the problem. XFS for one.
0
Comment
Question by:Ted22
8 Comments
 
LVL 1

Accepted Solution

by:
fbjean earned 300 total points
ID: 2676068
I`m not sure , but it may be because you try to use the id  0 for creating a new user.The id  0 is reserve for root only, you should try maybe 200 or more , see the /etc/passwd file for the next available id .

Hope this will help


0
 
LVL 1

Expert Comment

by:jwilcox
ID: 2676513
Are you trying to give the person wheel access, while not being root? then wouldn't useradd -g 0 <user> be good?

If you are just adding a general user why not do useradd <user>, and let useradd figure out the user id and group id?

Hope this helps!
0
 
LVL 1

Author Comment

by:Ted22
ID: 2676915
I've used other users and groups with the same result. As soon as you try to log in with the new user something changes and I don't know how to fix it. I will try not setting a user and group, but I want to load RedHat just for that purpose first.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 1

Expert Comment

by:jwilcox
ID: 2676926
Is useradd the robust version, or is it adduser that is the robust version? Anyway it adduser is the more robust version that in the end calls useradd have you tried that? If I'm remembering correctly that combo always worked really well for me.
0
 
LVL 1

Expert Comment

by:Barn_Owl
ID: 2676990
adduser I think.
0
 
LVL 1

Author Comment

by:Ted22
ID: 2677005
I started doing it one way in RH5.0 and it worked OK up till 6.0 or 6.1. It may have been the wrong way. As soon as I load I will try some things. I'm trying to get some understanding of what's happening.
0
 
LVL 1

Expert Comment

by:jwilcox
ID: 2677081
If it keeps on failing maybe you can look at your user list and notice the descrpency.
0
 
LVL 1

Author Comment

by:Ted22
ID: 2677288
adduser is linked to useradd in /usr/sbin (the same thing)RH6.1
There are a couple of good answers. I'm accepting the first one which I think is the best. I should have realized that I was conflicting with root or one of the other existing users. That is what my problem appears to be. I did it that way with RH5.0, 5.1, 5.2 and it seemed to work OK.
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

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…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

885 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