LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Can't log in as root in KDE but alright at CLI? (https://www.linuxquestions.org/questions/debian-26/cant-log-in-as-root-in-kde-but-alright-at-cli-674153/)

lugoteehalt 10-04-2008 07:41 AM

Can't log in as root in KDE but alright at CLI?
 
Inside KDE the virtual terminal emulator will not accept the root password. Nor will it accept $ su etc.. However outside KDE at the black screen there is no problem. Anyone any idea, I have none? I don't think it's the keyboard, I've tried it with both sets of number keys.

(It started after I completely repartioned the hard disk by cp ing all files and directories onto another hard disk; installing a base system of Etch AMD 64 from CD on the origional hd; then cp ing the files back using a live Ubuntu CD.) Thanks any help. Err....how'd'you change root's password?

jlinkels 10-04-2008 08:34 AM

It seems to be an impossible situation. Both in TTY and Konsole, su uses identical authentication. This is specified in pam.d somewhere down in /etc. su is su, from wherever you issue it. Even from a remote machine.

Have you tried ssh-ing in from a remote machine as user and then su? Both in TTY from the remote machine and Konsole from the remote machine?

Can you change the passwd on the suspect box in something that minimizes kbd issues, like AAAA

(Strange, as I write this my dead keys suddenly dont work anymore)

Changing root pwd from TTY is su to root and then enter the passwd command.

jlinkels

lugoteehalt 10-07-2008 11:34 AM

Quote:

Originally Posted by jlinkels (Post 3300013)
Have you tried ssh-ing in from a remote machine as user and then su? Both in TTY from the remote machine and Konsole from the remote machine?

Can you change the passwd on the suspect box in something that minimizes kbd issues, like AAAA

Thanks, sorry about delay. I'll try changing the password to AAAA like you say.

Can't do any ssh'ing - network down (diferrent problem). Although perhaps I could ssh myself, don't know.

Noticed other odd stuff:

Can't mount flash drives as ordinary user despite the 'users' word in fstab. /etc/fstab is exactly the same as it was before repartitioning and it allowed user to mount then. It says 'only root can do that'.

$ crontab -l, to look at the crontab shedule, gets permission denied. Despite the file being owned by the user. I always get buggered up by permissions so that might be something else.

Just thought now: could it be refusing to allow more than one root shell, or something like that?

Thanks again.

jlinkels 10-08-2008 06:24 AM

You are allowed as many root shells as you like. Can you check /var/log/auth.log?

jlinkels

lugoteehalt 10-09-2008 11:48 AM

You were right it is not a KDE problem. What it is is that I may log in as root from a login shell but not from the next shell - the one you go to after the log in shell; is it the bash shell, who can tell.

Did
$ strace su
It said that permission was denied for /etc/shadow, I think. So added myself to group shadow and su gave a different message than before. Sorry, grotesque but can't remember same.

Get impression that what has happened is that (I cp'ied / to another hard disk; installed a basic Etch AMD 64 system; cp'ied / back using Ubuntu live CD) during installation of basic Etch system used default box name (the one that appears in the CL prompt) of 'debian'. Previously was using the name 'asus'. So coppied in stuff for 'asus' to a 'debian' thing.

Incidentally
# hostname debian
does not change the hostname to debian. It has no effect on /etc/hostname. Changed this file manually but still cannot log root in.

Thanks. Tried changing password to AAA, no change. Will get back with /var/log/auth.log.:)

jlinkels 10-09-2008 01:22 PM

OK, there is a difference between login and su.

Read /etc/pam.d/su and see if you see something useful there. I am no specialist in pam, but I hope I am pointing you into the right direction.

I am not sure that I use shadow passwords myself, I don't have /etc/shadow.

When you did the copy action, are you sure you copied all file permissions correctly?

jlinkels

richinsc 10-09-2008 11:59 PM

In the words of jlinkels

Quote:

Originally Posted by jlinkels (Post 3305426)

When you did the copy action, are you sure you copied all file permissions correctly?

jlinkels

I would have included the command in case this person doesn't know how to perserve permissions when using cp and other users may be reading this and wondering the same thing so when using cp to copy files and you would like to preserve permissions use this...

Code:

cp -p /old/path /new/path
Of course to ensure that this happens properly you must use this command when you copy the files from the system to your external drive and then also use the command when you copy them back. Otherwise your permissions are likely to change and the ownership of the files will change.

If you need change the ownership for recursive directories use the following. This example is for /etc

Code:

chown -R user:group /etc/

lugoteehalt 10-11-2008 05:29 AM

Quote:

Originally Posted by richinsc (Post 3305779)
In the words of jlinkels



I would have included the command in case this person doesn't know how to perserve permissions when using cp and other users may be reading this and wondering the same thing so when using cp to copy files and you would like to preserve permissions use this...

Code:

cp -p /old/path /new/path

That it I think, so assume system irreversibly hosed and have reinstalled. One should think before one does things I find.

Changed /etc/pam.d/su to be as undemanding as possible but did not help.

Thanks again.


All times are GMT -5. The time now is 05:33 PM.