Solved

useradd

Posted on 2000-04-01
8
608 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
[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
8 Comments
 
LVL 1

Accepted Solution

by:
fbjean earned 100 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
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!

 
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

Suggested Solutions

Title # Comments Views Activity
Samba 4, Users Permission, 5 111
Certificate Request CentOS/Apache 1 56
Enable SPF on IMSVA 6 65
http response code 3 36
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.
Suggested Courses

739 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