root password no longer works when loggesd in as user
Well I guess I did something stupid because my root password no longer works when I try to su. I have no idea what is causing this, but I will explain what I did when it started happening.
1. I deleted all the files in /tmp (didn't relaize I needed some of those) 2. When I rebooted and tried to log into my user account (I'm in run level 4) KDE would start to load but then suddenly go back to login prompt 3. I popped over to the console on tty6 to check out the .xseession-errors and it was complaining about some of the /tmp files not being owned by root (the one I deleted not realizing it was important, I think it was .ICE-unix) 4. These files must have been recreated, but were owned by my user, so I did this: 'chown -R root.root /tmp .*' but then quickly aborted realizing that '../' might be included which would not be good. 5. rebooted again. Now I can log in as user, but my root password does not work when I 'su'. My root password will work if I switch to tty6 and log in as root, so I don't think it's a problem with the password files. Contents of new ~/.xsession-errors for user: Code:
stderr is not a tty - where are you? Code:
drkstr@dsk:~$ ls -al /tmp Also, is there a way to stop KDE (or X11 maybe?) from depending on files in the /tmp directory? Thanks in advance! ...drkstr |
I don't know what you broke, but try running
strace -o debug su and look at the file debug afterwards. Should give you an indication as to what's going on. CHeers, Tink |
<sigh>
This is what I was afraid of. There are a bunch of permission denied errors which means I probably didn't kill me ill-executed chown command in time. I probably changed the group ownership to some necessary files. This is my guess at least, I think I'm still a little to new to Linux to understand debug info compleatly. Code:
drkstr@dsk:~$ cat debug | grep "Permission denied" Thanks Tink! ...drkstr |
'upgradepkg --reinstall *.tgz' from within the a/ directory did the trick (also remembered to copy my custom kernel back over).
I need to be more careful with .* in the future. Good thing there is a failsafe with 'rm .*' Or I would be in a world of hurt! ;) Thanks again for the strace command, I need to learn more about this to use it more effectively in the future. ...drkstr |
You're welcome mate, and glad the fix was easy enough.
Cheers, Tink |
All times are GMT -5. The time now is 06:24 PM. |