PDA

View Full Version : su problem



owakroeger
13th January 2007, 04:13 PM
This problem is really odd, and it has me stumped. I'm running on FC5. If I try to chamge to su from a command line, this is what I get;
$ su
Password:
su: incorrect password

Yet, if I launch any program or function which requires root pribileges, i.e.
$ system-config-services
(splash prompting for root password. I enter root password, and its happy.)
BackupPC
BackupPC is stopped
BackupPC
BackupPC is stopped
BackupPC
BackupPC is stopped
I can make whatever changes I desire, and they take. Yum, synaptic, etc., all work just fine when I enter root password at the splash prompt.
If I log out as me and log in as root, I can log in and everything works hunky-dory.
Also, sudo works just fine. I can perform most su functions using sudo.
I couldn't find anything amiss in /etc/passwd;
$ cat passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
news:x:9:13:news:/etc/news:
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
rpm:x:37:37::/var/lib/rpm:/sbin/nologin
apache:x:48:48:Apache:/var/www:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
netdump:x:34:34:Network Crash Dump user:/var/crash:/bin/bash
pcap:x:77:77::/var/arpwatch:/sbin/nologin
avahi:x:70:70:Avahi daemon:/:/sbin/nologin
named:x:25:25:Named:/var/named:/sbin/nologin
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
hsqldb:x:96:96::/var/lib/hsqldb:/sbin/nologin
beagleindex:x:58:58:User for Beagle indexing:/var/cache/beagle:/bin/false
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
gdm:x:42:42::/var/gdm:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
ugly:x:500:500:Al Kroeger:/home/ugly:/bin/bash
torrent:x:100:101:BitTorrent Seed/Tracker:/var/spool/bittorrent:/sbin/nologin
backuppc:x:101:102::/var/lib/BackupPC:/sbin/nologin
clamav:x:102:103:Clamav database update user:/var/lib/clamav:/sbin/nologin

I tried re-compiling a vanila kernel from kernel.org, and that didn't fix this problem, but some other minor quirks with Win4LinPro and wine were resolved with the new kernel. This problem continues regardless of the kernel I boot to.

$ uname -a
Linux 00301B1CFE09 2.6.18.1-fc5 #1 Mon Jan 8 06:31:01 MST 2007 i686 athlon i386 GNU/Linux

Does anyone have a guess what might have happened, and how I might fix it?
Thanks for any help.
owa

bob
13th January 2007, 04:18 PM
Interesting! No ideas, but how about if you log in as full root (su -) ; still a password problem?

owakroeger
13th January 2007, 04:32 PM
Bob,
Same thing;
$ su -
Password:
su: incorrect password
owa

roofer
15th January 2007, 04:00 AM
I had a sort of similar problem - could not log into "su -". Turns out that during one of my many senior moments, while trying to do something useful, I changed a bunch of permissions on about half of the files on my system. One that has alot to do with su is, of course, /bin/su. The permissions should be "-rwsr-xr-x" (suid bit must be set). This is only one of many possibilities. Hope you find your solution

--roofer

sideways
15th January 2007, 04:40 AM
what happens if you actually change/re-enter the root password?

(log in as root, which you say you can do then type 'passwd', you can just enter the same password, it updates various authentications)

note, even if you forget root's pasword you can do this from the grub menu (as long as you haven't password protected that and forgot it!) by typing 'a', and then appending '1' or the word 'single' to the kernel line, it will boot you in single usr mode - a root command line interface, and here you can reset root's password with passwd)