Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SU Problems on SunOS 5.6

Status
Not open for further replies.

mcolford

MIS
May 21, 2003
9
US
Operating System: SunOS 5.6
Hardware: Sun Ultra2

I am having problems when trying to su from another UNIX account. When I attempt to su from an account called jdoe to jadoe I get an error "SU-Sorry". I am able to telnet directly to the machine using the jadoe user account and I am able to su - jadoe from the root account.

In /var/adm/messages, I get the following error:

May 24 15:38:38 neptune PAM: ck_perm: can not open passwd/shadow file

Both of these files have a userid:gid = root:sys and permissions set to:

-rw-r--r-- 1 root sys 1191 May 24 11:34 /etc/passwd

-r-------- 1 root sys 671 May 24 11:34 /etc/shadow

Can someone assist me on how to fix this problem?

Thanks.

Thanks,

mcolford
 
Mcolford,
Saw something like this years ago. Racked my old brain to remember what caused it. The only think I can remember is my shadow file was corrupted. There was a blank line in the middle of the entries. I know we are told never to edit the shadow file but, if I remember right I removed the blank line and all was well. Never found out why this happened and it never happened again. Use vi to edit the file as root and you will be able to save your changes with a wq! (I bet you knew that)...lol
 
In addition, it might also be worth trying a pwconv to update /etc/shadow. man pwconv for details. HTH.
 
Thanks for the help. It turned out that both /usr/bin/su and /usr/bin/passwd had erroneous permissions. I had set the permission modes for both of these commands to 4555.

Also, the shadow file was corrupted and did not have the encrypted passwords. The shadow file was re-created.

Mike

Thanks,

mcolford
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top