PDA

View Full Version : password-less su to root?"



arkaine23
02-12-2004, 12:17 AM
I'm remastering in a chrooted X environment. All of a sudden I can't su as knoppix. It prompts me for a password, but I have not set one. How can I get it back the way it was, so I can su wihtout entering any password?

I think this started when I launched kcontrol to edit the login manager module and hit ignore when it prompted me for a root password.

kurgan
02-23-2004, 05:25 AM
A couple of things to look for:

- You're running bash as your shell for users knoppix and root (last field in /etc/passwd)
- There is an alias in the file /etc/profile that aliases "su" to "sudo su"
- There is a file /etc/sudoers that allows the knoppix user to sudo anything without a password
- The 2nd field (encrypted password) in /etc/shadow for both knoppix and root should be "*"

Hope you find one of these set wrong 8)

perezmpv
02-23-2004, 02:16 PM
Other thing that you can do is go to knoppix sesion and load the root console then type passwd and it change your root password for let you make changes in the configuration that you need

arkaine23
02-23-2004, 06:32 PM
Thanks, I'll check on those things. I know /etc/sudoers is ok, and I know both accounts still have a null password. It's probably /etc/profile. I tried to alias sudo su in knoppix's .bashrc but that didn't work...

arkaine23
02-26-2004, 07:53 AM
All those things check out, but the alias is being superceded I think. It's in /etc/profile and in ~/.bashrc. But in KDE, I have to type sudo su manually or else it prompts me for a password. It doesn't do this in other WM's. Seems like something in KDE has taken over my ability to su.