Implications of missing suid bit for su command

Problem:

We can successfully log in as root user using ssh but when I when I do su - to login as root , it says " incorrect password " even though passwords are same and I am typing the correct password.

$ su -
Password:
su: incorrect password

Solution:

suid permission was missing for su command. Setting the SUID bit for su command resolved the issue

$ ssh root@192.168.3.144
root@192.168.3.144's password:
Last login: Fri Mar 14 14:33:47 2014 from test.example.com

# ls -l /bin/su
-rwxr-xr-x. 1 root root 34904 Oct  5  2011 /bin/su


# chmod u+s /bin/su

# ls -l /bin/su
-rwsr-xr-x. 1 root root 34904 Oct  5  2011 /bin/su

#su - ssdg

#su -
Password:

# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

Comments

Popular posts from this blog

PSSH : Parallel SSH to execute commands on a number of hosts

How to add check_http as a service in Nagios Monitoring using NRPE

Configuring Nagios to monitor services using NRPE