LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-21-2006, 09:51 PM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
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?
xset:  bad font path element (#68), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax
xset:  bad font path element (#68), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax
startkde: Starting up...
kbuildsycoca running...
Code:
drkstr@dsk:~$ ls -al /tmp
total 36
drwxrwxrwt   8 root   root  4096 2006-07-21 18:32 ./
drwxr-xr-x  18 root   root  4096 2006-07-15 15:51 ../
drwxrwxrwt   2 root   root  4096 2006-07-21 18:32 .ICE-unix/
-r--r--r--   1 root   root    11 2006-07-21 18:32 .X0-lock
drwxrwxrwt   2 root   root  4096 2006-07-21 18:32 .X11-unix/
drwx------   2 root   root  4096 2006-07-21 18:20 kde-drkstr7NUopt/
drwx------   2 drkstr users 4096 2006-07-21 18:32 kde-drkstroWPpXg/
drwx------   2 root   root  4096 2006-07-21 18:20 ksocket-drkstr6Qln2b/
drwx------   2 drkstr users 4096 2006-07-21 18:32 ksocket-drkstrBaUhXe/
Any ideas what I broke, and how to unbroke it?

Also, is there a way to stop KDE (or X11 maybe?) from depending on files in the /tmp directory?

Thanks in advance!
...drkstr
 
Old 07-22-2006, 02:53 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 07-22-2006, 03:56 AM   #3
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
<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"
readlink("/proc/self/fd/0", 0x805aa98, 4095) = -1 EACCES (Permission denied)
readlink("/proc/self/fd/0", 0xafcc601c, 511) = -1 EACCES (Permission denied)
open("/var/run/utmp", O_RDWR)           = -1 EACCES (Permission denied)
open("/etc/shadow", O_RDONLY)           = -1 EACCES (Permission denied)
open("/etc/shadow", O_RDONLY)           = -1 EACCES (Permission denied)
I will reinstall the a/ packages and hopefully this will resolve the problem.

Thanks Tink!
...drkstr
 
Old 07-22-2006, 04:18 AM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
'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
 
Old 07-22-2006, 04:20 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
You're welcome mate, and glad the fix was easy enough.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 11:28 PM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 10:59 AM
cdparanoia works as root but not as user arubin Linux - Software 8 11-21-2004 03:37 PM
X only works with root user joe83 Slackware 14 09-06-2004 09:17 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 05:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration