LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-24-2014, 11:20 PM   #1
john.wythe@activant.com
Member
 
Registered: Nov 2009
Location: Burnaby BC
Posts: 77

Rep: Reputation: 1
unix_chkpwd unknown user root


I have another system (Redhat 6) with this problem. We are not able to login at all the only access we have is single user mode.
When we try to change the root password, or password of a user we just added in single user mode we get the message unix_chkpwd unknown user ... It then prompts for new password and to verify, and then gives errors about unable to obtain info, and authentication tokens not updated. The next chance I get I will check the lsattrs of /etc/passwd and /etc/shadow.
the regular permissions are :
/etc/passwd rw-r--r--
/etc/shadow ---------

The root entry in /etc/passwd and /etc/shadow look fine, as does the enrty in /etc/group. I have not checked the shadow for for /etc/group yet.

The system was working fine. I was in the process of loading it with our software and updating the OS using yum.
I have since done a yum reinstall of all the installed packages and a yum update. rebooted afterwards and still can't login in normal mode or change password in single user mode.

Is there a file in /etc/pam.d that might have an effect on this.

Are there any other files I should look at?

My only other recourse is to re-install from scratch, which while not a big issue as it is a new system I'd rather find out what the problem is and how to fix it for future cases.
 
Old 04-25-2014, 04:07 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Check in /etc/nsswitch.conf for the passwd, shadow and group lines. If they say "compat" try "files" in case something is broken in the nsswitch libraries.
 
Old 04-28-2014, 02:50 PM   #3
john.wythe@activant.com
Member
 
Registered: Nov 2009
Location: Burnaby BC
Posts: 77

Original Poster
Rep: Reputation: 1
I reloaded the system from scratch. All was fine until I ran a script that copies users from the old system to the new system. It uses the adduser script in Linux to add the user, but uses sed to edit the shadow file to copy the password. I think this is where the issue is. I turned off selinux when I ran into the problem again after copying the users and was able to login again. I notice some other commands getfattr and setfattr. Next time I am going to check and see what the attrs are before I run the script and set them back. I also might try copying the file back after sed runs instead of moving it. That might keep any attrs that might get lost other wise.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] unix_chkpwd[15479]: could not obtain user info (root) john.wythe@activant.com Linux - Security 2 10-23-2012 08:41 PM
how can i write to a root:root 750 file with a non-root user? Droa Linux - Newbie 1 05-14-2012 07:49 PM
How to change a process running in root-user to non-root user ???????????????????? narendra1310 Linux - Software 4 10-29-2009 02:11 AM
unknown id: root Smokey Slackware 3 12-05-2004 02:49 PM
unknown root password michael brooks Linux - Security 6 07-05-2001 05:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration