Operating System - Linux
1755120 Members
2827 Online
108830 Solutions
New Discussion юеВ

Can't su to root except from root

 
Steve_615
Occasional Advisor

Can't su to root except from root

I can't su to root any longer from an average user id. However, it worked earlier today.
All userid's have valid pw's and accounts are not expired. I can su to root from root. All other ID's get "su: sorry" whenever trying to su to root or any other ID. After searching the forum. Pam.conf is good. There is not /etc/default/security file. The system is trusted. Not sure where to turn from here.

Thanks in advance for any help.
6 REPLIES 6
Stuart Browne
Honored Contributor

Re: Can't su to root except from root

Can you please copy/paste the enture 'su' conversation from your shell, so we can see what you're issuing, and exactally how the error appears?
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: Can't su to root except from root

Hrm.. but short there..

Also.. what log entires are made in '/var/log/messages' when you attempt to 'su'?

You say 'pam.conf'. What distribution are you using? In most modern distributions, the file you should be looking at is '/etc/pam.d/su'. Paste the contents of that file here too please.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Can't su to root except from root

hmm /etc/default/security

That sounds like an hpux system?!

Am I right?

If so run the following commands as root.

pwck

grpck

If you have root login at all.

You may need to boot single user to get back to root control.

It would appear that you may have a corrupt /etc/passwd or /etc/group file

Or that I have totally misdiagnosed this call and should be whacked around a few times.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gopi Sekar
Honored Contributor

Re: Can't su to root except from root


if this is a linux box then check /etc/pam.d/su file and see whether the following line is uncommented, if so comment it back.

#auth required /lib/security/$ISA/pam_wheel.so use_uid

also it would be better if you give the exact command line and exit status (check $?) also the contents of /var/log/messages and /var/log/secure

Regards,
Gopi
Never Never Never Giveup
Gopi Sekar
Honored Contributor

Re: Can't su to root except from root

Found this link, see whether it is of help to you:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=907929

Hope this helps,
Gopi
Never Never Never Giveup
Bejoy C Alias
Respected Contributor

Re: Can't su to root except from root

Dear Steve,
if the following line is not commented out then only the users in wheel group are allowed to do su.
auth required /lib/security/pam_wheel.so use_uid
So check this in the file /etc/pam.d/su.
Be Always Joy ......