Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-20-2008, 02:38 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2003
Location: California
Distribution: Red Hat
Posts: 9
Rep:
|
Repair User - su: incorrect password
Hello,
I have a system set up with an administrator account aside from root.
I've lost the ability to su to that administrator account, even from root. It was working fine a week ago.
When I log in as root, I get the following:
[root@localhost root]# su admin
su: incorrect password
I can su to any other account just fine.
[root@localhost root]# su user
bash-2.05b$
I've tried changing the root password and admin password, but nothing has helped. I've removed the admin entries from /etc/passwd and /etc/shadow and tried, and system says the account doesn't exist, which is expected. However, when I add them back, same problem.
Not sure if this matters or not, but the admin account password was set to expire after 60 days. I've checked the config files the account is not locked.
Is there a way to repair the admin account?
Thanks,
Ryan
Last edited by Ryanitus; 11-20-2008 at 02:47 PM.
|
|
|
|
11-20-2008, 03:02 PM
|
#2
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
Look at the "passwd -u" option to unlock the account - it probably got locked due to expiration. You can also use the "chage" command to deal with setting expiration values.
|
|
|
|
11-20-2008, 04:21 PM
|
#3
|
|
LQ Newbie
Registered: Jan 2003
Location: California
Distribution: Red Hat
Posts: 9
Original Poster
Rep:
|
*** solution ***
I had checked everything concerning the /etc/passwd and /etc/shadow files, everything seemed to be ok. I tried locking and unlocking with 'passwd -l' and 'passwd -u', but still no go.
As it turns out, there were cron jobs that did a su to the admin account.
When the password expired, the cron job was being prompted for the password. After 3 login failures, the account was getting locked by PAM. This was due to using the pam_tally.so module.
To fix the problem, I removed deny= argument from /etc/pam.d/system-auth.
Before:
account required /lib/security/$ISA/pam_tally.so per_user deny=3 no_magic_root reset
After:
account required /lib/security/$ISA/pam_tally.so per_user no_magic_root reset
|
|
|
|
03-07-2009, 07:32 PM
|
#4
|
|
Member
Registered: May 2004
Posts: 47
Rep:
|
hello,
I use Mandriva 2009 on a Toshiba laptop.
As a user, if I run 'su', I get 'su: incorrect password'. The password is correct because I can login as root.
I do not see anything like "deny=" in my system.auth file.
Any idea?
alam--
|
|
|
|
03-09-2009, 03:12 PM
|
#5
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
Please do not append to old threads. You'll get much more visibility by starting a new one.
|
|
|
|
06-08-2009, 06:44 AM
|
#6
|
|
LQ Newbie
Registered: Jun 2009
Posts: 1
Rep:
|
solutions
so that it looks like
[root@localhost ~]# ls -l /bin/su
-rwsr-xr-x 1 root root 24120 May 24 2008 /bin/su
|
|
|
|
12-03-2009, 08:21 PM
|
#7
|
|
LQ Newbie
Registered: Jun 2009
Posts: 11
Rep:
|
Hi Ryanitus,
Am having the same problem ..using RHEL 4 U 7.
Tried with locking unlocking passwd but no luck.
Have you managed to solve it ?
|
|
|
|
12-03-2009, 08:56 PM
|
#8
|
|
LQ Newbie
Registered: Jun 2009
Posts: 11
Rep:
|
Hi all,
The account faillog count for the user was above threshold and this caused the pam denies the login.
Mine is got solved by ,
As a root
Step 1. Changing the entries in file /etc/pam.d/system-auth
password required /lib/security/$ISA/pam_cracklib.so retry=3 type=
password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
password required /lib/security/$ISA/pam_deny.so
password required /lib/security/pam_unix.so remember=4 use_authtok md5 shadow
Change the required and sufficient to optional.
Step 2. remove the deny entry
account required /lib/security/pam_tally.so deny=5 reset no_magic_root
Remove the deny=5 entry from the above line.
Step 3. Save and quit.
Step 4. Su to user
step 5. Verify your failog for count is back to 0.By executing faillog -u user
Out will be similar like
Username Failures Maximum Latest
user 0 0
step 6. back to root
step 7. roll back all the changes done for /etc/pam.d/system-auth.
Hope it helped
Thanks and regards.
Vysakh Chandran.
|
|
|
|
12-03-2009, 09:34 PM
|
#9
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,261
|
quicker/easier, use the -r (reset) option
http://linux.die.net/man/8/faillog
|
|
|
|
12-03-2009, 10:35 PM
|
#10
|
|
LQ Newbie
Registered: Jun 2009
Posts: 11
Rep:
|
In my case , I had tried the Failog -r and was no exception ..
But yes. its worth a try before proceeding ahead with editing pam file.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:21 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|