Thread: Unable to su
View Single Post

   
  #7 (permalink)  
Old 02-20-2008, 08:06 AM
Menno Duursma
 
Posts: n/a
Default Re: Unable to su

On Mon, 06 Jun 2005 22:08:21 +0200, PJ Beers wrote:

> If I run su I get the following output:
>
> ~$ su
> Password:
> Sorry.


Check that the permissions on "su" are correct, on my box it looks like:

~$ ls -l /bin/su
-rws--x--- 1 root wheel 35780 2004-06-21 21:20 /bin/su*

Which means users should be in the "wheel" group for them to access it at
all ("menno" is, but "pan" is not, etc.) And as it's a SUID binary when is
does get run, it will be executed with the privileges of the user owning
it, rather then the user that spawn it (root in this case).

Try something like:

gpasswd -a pj wheel
chgrp wheel /bin/su
chmod 4710 /bin/su

If this seems to make no sense, here is a more elaborate attempt of mine
to explain the SUID concept:
http://groups-beta.google.com/group/...eacf7c3639f04f

Another thing concerning /bin/su , maybe the authentication method or
user/group authorization configured in you /etc/suauth , for that read:

man suauth

> I still am able to log in as root, so I think something must be wrong
> with my own useraccount, but I don't know what. I did not forget root's
> password, in any case.
>
> Likewise, I have also become unable to mount my iPod, which formerly I
> could. Root can still mount it, fstab formerly said, and still says
>
> /dev/ipod /mnt/ipod vfat noauto,defaults,gid=100,user
>
> but I can't.


Here again "mount" needs root (or actually EUID 0) privileges to work, so
change the permissions to suid, like:

chgrp wheel /bin/mount
for p in go-rwx g+x u+srwx ; do chmod $p /bin/mount ; done

> I googled about the su issue, but the only fix I saw concerned the
> permissions for su,


Which are very likely to be the problem indeed.

> and they are correct on my box (I checked against the package from
> which it originated).


Are you really sure about that?

--
-Menno.

Reply With Quote