Solved

useradd

Posted on 2000-04-01
8
599 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 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Expert Comment

by:jwilcox
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Expert Comment

by:Barn_Owl
Comment Utility
adduser I think.
0
 
LVL 1

Author Comment

by:Ted22
Comment Utility
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
Comment Utility
If it keeps on failing maybe you can look at your user list and notice the descrpency.
0
 
LVL 1

Author Comment

by:Ted22
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
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…

771 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

16 Experts available now in Live!

Get 1:1 Help Now