LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2013, 04:38 AM   #1
qazianeel
LQ Newbie
 
Registered: Jan 2013
Location: Karachi
Distribution: RHEL 5
Posts: 7

Rep: Reputation: Disabled
su incorrect password error!


Hello friends,

I'm using RHEL 5, the problem I'm facing is that the su command doesn't work. If I logged in as root user I can switch to other user as it doesn't requires password but when I try to revert back to root account it gives me error "su : incorrect password ". Similarly I'm unable to switch from one user account to another.

I've tried some steps mentioned on other forums but none of them worked for me, like setting permission of on su command, password -u command to unlock accounts etc.

Someone recommended to change /etc/pam.d/su and /etc/pam.d/sshd but being newbie I don't know how to change them, the contents of these file are:

/etc/pam.d/su:
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth required pam_wheel.so use_uid
auth include system-auth
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
account include system-auth
password include system-auth
session include system-auth
session optional pam_xauth.so

/etc/pam.d/sshd:
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so

Please help.

Regards
 
Old 01-08-2013, 05:31 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
You've posted this in the kernel forum - which is wrong. Newbie might be best.

What does 'ls -l su' show?
What does 'rpm -Va' show?
What does 'pwck' show?
 
Old 01-08-2013, 05:42 AM   #3
qazianeel
LQ Newbie
 
Registered: Jan 2013
Location: Karachi
Distribution: RHEL 5
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
You've posted this in the kernel forum - which is wrong. Newbie might be best.
Sorry, actually I was searching same kind of question and the last one I saw on this forum, so I also posted my question on here :-s

Quote:
What does 'ls -l su' show?
-rwxrwxrwx 1 777 root 28336 Oct 31 2008 /bin/su

Quote:
What does 'rpm -Va' show?
rpm -Va lists so many lines can't put here :-s

Quote:
What does 'pwck' show?
user adm: directory /var/adm does not exist
user news: directory /etc/news does not exist
user uucp: directory /var/spool/uucp does not exist
user gopher: directory /var/gopher does not exist
user pcap: directory /var/arpwatch does not exist
user avahi-autoipd: directory /var/lib/avahi-autoipd does not exist
user sabayon: directory /home/sabayon does not exist
pwck: no changes

Regards
 
Old 01-08-2013, 06:09 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
-rwxrwxrwx 1 777 root 28336 Oct 31 2008 /bin/su
That mode is wrong - it looks as if your host has had a bit of a disaster. I suggest resetting modes to the RPM database values:
http://www.cyberciti.biz/tips/reset-...ermission.html
as a short-term fix and after that you can think about whether you want to reinstall.
 
Old 01-08-2013, 08:10 AM   #5
RaviTezu
Member
 
Registered: Nov 2012
Location: India
Distribution: Fedora, CentOs, RHEL
Posts: 164

Rep: Reputation: 24
i guess /bin/su is provided by coreutils-* package.
Use
Quote:
yum provides /bin/su
to get the package name which provides /bin/su.

You can use --setperms to reset the permissions(of the file) back to normal..As suggested by linosaurusroot
i.e
Quote:
rpm --setperms <package-name>
<package-name> = the output you got from the "yum provides /bin/su".

if it lists more than one package.. you should use the latest one.
 
  


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] Incorrect Password. metaron Linux - Newbie 6 10-18-2011 11:28 AM
[SOLVED] "Login incorrect" error after boot - no password prompted rramesh1 Linux - Newbie 5 05-22-2011 12:39 PM
su: incorrect password High_Roller Linux - Software 1 05-21-2010 11:12 AM
Proftpd 530 Login Incorrect error besides correct password imagineers7 Linux - Networking 9 01-07-2008 02:13 AM
kdesu gives incorrect password error with correct password. dasy2k1 SUSE / openSUSE 1 04-16-2007 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:35 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