LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   passwd problems (https://www.linuxquestions.org/questions/linux-security-4/passwd-problems-82465/)

(l.winthorst) 08-16-2003 02:26 AM

passwd problems
 
Hi! I'm a newbie, but I thought that the question I have might go better in this forum. I just installed RedHat 9 for the first time and tried to create some new users. I ran into some stiff problems, and here they are:

I can run passwd fine as root.

Then, just adding references to the new users in /etc/passwd & /etc/group worked to create the new users, but when I ran passwd as root with their names, and when I logged on as them and ran passwd, it allowed me to type in the new passwords but returned this message:

"passwd: User not known to the underlying authentication module "

I apoligize for my bad english, but I'm mad sleepy.

Next I tried the adduser command. Again, it added users. When I used the -p (password) switch it also created users. But when I tried to log on as these users with the password, even though I know it was the same, I was told it was "incorrect."

Finally, I tried to run the add new users dialog in X. When nothing happenned, I found the script it pointed to: /usr/bin/redhat-config-users or something like that. I ran this from the terminal and had a lot of pythonish program-breaking (useful and informative) garbage being thrown back at me.

I then turned the computer off in frustration, but if you need the exact message I can power it up and run it again tomorrow, but now I must sleep.

Thanks for any help possible,
Phil Hughes

--p.s. I'm having a worse day now that I realized I misspelled my username -- dammit! it should be (l.windthorst)

david_ross 08-16-2003 12:43 PM

Try this as root:
useradd USERNAME
passwd USERNAME

(l.winthorst) 08-16-2003 06:14 PM

It returns the same "passwd: User not known..." error.

Mathieu 08-16-2003 07:01 PM

Verify that there are no duplicate entries in the following files.
/etc/passwd
/etc/group
/etc/shadow

You can also try to remove what you did.
Code:

userdel -r username
groupdel groupname


rahulsundaram 08-16-2003 07:17 PM

hi

if you have setup shadow passwords manually adding group and user names wont work. delete everything you created.

type adduser username
passwd username and enter your password twice

that should do it

redhat-config-user does throw up useless info from console.dont worry about that

regards
rahul sundaram

(l.winthorst) 08-17-2003 01:37 PM

Ok, that worked.

Thanks a whole lot! I look forward to the day I can hang out here and help out some new guys.

One last thing, though, if you have any time -- why did that work, and what was I doing wrong before. I remember while installing there was a prompt that said "shadow passwords" somewhere, but neither of my two books nor anything I found online mentioned that my choice there had an impact on how I could add/delete users and their passwords.

Thanks again!
Phil

Mathieu 08-17-2003 02:19 PM

I am assuming you removed what you did and tried again using the commands or the GUI.

In your original post, you mentioned you added new entries in /etc/passwd and /etc/group,
but you forgot to add an entry in /etc/shadow

rahulsundaram 08-18-2003 03:44 AM

hi

shadow passwords are stored in /etc/shadow instead of /etc/passwd which is encrypted but readable by everyone. this also helps with passwords which have a length more than 8.

so you should add to /etc/shadow if you have enabled that

regards
rahul sundaram

rdonovan 10-21-2003 12:30 PM

The other thing to remember about the useradd -p option, at least in RedHat 9.0, is that it puts an unencrypted password in the password field in /etc/shadow when the account is created, which doesn't work well from a security standpoint.

RD


All times are GMT -5. The time now is 01:58 PM.