You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, September 10th 2008, 12:17am

Super User and root locked out!

Hi, newbie KDE user.

I assume this is common. But I am officially throwing up my hands and asking for help.

For days after installing KDM 3.5 on FreeBSD 6.1, I had no trouble updating ports and installing packages using super user terminal and super user file manager. Any time I needed root permissions I simply opened the Super-User terminal.

Now, after updating my ports, I suddenly can't access Root at ALL! The terminals either don't open, open with an su:sorry or "su returned with an error" message. I can only access my user name in a terminal.

Since I boot directly into KDM and can only login with a general user (suddenly no longer a member of "wheel") I have no way to get to a command line for root login.

Since I can't access ANY command line when I start freebsd, as well, I can never login as root and can't fix any config files.

Any help would be greatly appreciated. (I don't want to have to re-partition and reinstall FreeBSD from DVD, update ports and install software, because I wanted to try KDE!)

Thanks
Dave

beermad

Beginner

Posts: 21

Location: Ipswich, England

Occupation: Semi-retired software engineer

  • Send private message

2

Wednesday, September 10th 2008, 12:53pm

RE: Super User and root locked out!

Hi, newbie KDE user.

I assume this is common. But I am officially throwing up my hands and asking for help.

For days after installing KDM 3.5 on FreeBSD 6.1, I had no trouble updating ports and installing packages using super user terminal and super user file manager. Any time I needed root permissions I simply opened the Super-User terminal.

Now, after updating my ports, I suddenly can't access Root at ALL! The terminals either don't open, open with an su:sorry or "su returned with an error" message. I can only access my user name in a terminal.


Try accessing your user in a terminal and typing:
su -
You should then be prompted for your root password and when you supply it, you'll be logged in.

3

Wednesday, September 10th 2008, 6:04pm

RE: RE: Super User and root locked out!

Try accessing your user in a terminal and typing:
su -
You should then be prompted for your root password and when you supply it, you'll be logged in.
Didn't work. Here is what I got in konsole:

Source code

1
2
3
[myuser2@ /usr/home/myuser2]$ su -
su: Sorry
[myuser2@ /usr/home/myuser2]$


When I type it in "run command" it also gives "su:sorry".

I can't access anything but KDE, and that only with a username that no longer has any super user authority.

There must be (should be) a way for me to be able to get out of kde and to a command line.

I really don't want to reinstall everything.

Thanks,
Dave

beermad

Beginner

Posts: 21

Location: Ipswich, England

Occupation: Semi-retired software engineer

  • Send private message

4

Wednesday, September 10th 2008, 7:00pm

RE: RE: RE: Super User and root locked out!



Try accessing your user in a terminal and typing:
su -
You should then be prompted for your root password and when you supply it, you'll be logged in.
Didn't work. Here is what I got in konsole:

Source code

1
2
3
[myuser2@ /usr/home/myuser2]$ su -
su: Sorry
[myuser2@ /usr/home/myuser2]$


Ah, so you're not actually getting the opportunity to type your root password?

I think this means the root account's been locked, as it is by default in Ubuntu. If that's the case, then you should be able to run commands as root with
sudo command-name
It should then prompt for a password (in Ubuntu it's your user's password, it may be root's in other distros) and then run the command.

To unlock the root account, try
sudo passwd
which should (after prompting for a password to run the command) prompt you to set a new password for root.
I'm fairly sure that should be all you need to do to unlock it; if it doesn't, try googling for instructions on how to unlock it.

5

Wednesday, September 10th 2008, 8:12pm

Quoted

Ah, so you're not actually getting the opportunity to type your root password?
EXACTLY! Root is unavailable to me in KDM. AND since I boot directly into KDM I cannot ever access a system login command.

In essence, I can not login to anything other than KDM, or the FreeBSD installation CD (which doesn't help me uninstall installed packages).

Thanks anyway, though. Both su and sudu are lost to me. I can't even open the kdm user manager utility - I get "error: KDE su returned with an error".

I tried your solution. But since su and sudu are corrupted ...

I get "bash: sudo: command not found".

I re-booted to single user mode in unix (a command line), but that doesn't even allow the most basic usual command line options like using text editors or even standard shell commands for text like copy, move, etc.

This is a truely EVIL little bug feature of KDE that everyone should beware of (in the off chance it happens to them). I noticed a few instances here of it happening and the person not getting a solution

Once we commit to booting directly into a gui we are forever lost if the root access is locked or corrupted.

I'll try to find a solution elsewhere, and if I DO or DON'T get one, I will post a note here so people like me in the future will be able to find it.

Thanks for trying.
Dave

beermad

Beginner

Posts: 21

Location: Ipswich, England

Occupation: Semi-retired software engineer

  • Send private message

6

Wednesday, September 10th 2008, 8:28pm


I tried your solution. But since su and sudu are corrupted ...

I get "bash: sudo: command not found".

I re-booted to single user mode in unix (a command line), but that doesn't even allow the most basic usual command line options like using text editors or even standard shell commands for text like copy, move, etc.

This is a truely EVIL little bug feature of KDE that everyone should beware of (in the off chance it happens to them). I noticed a few instances here of it happening and the person not getting a solution
I don't think this is a KDE problem. It sounds like something's been either corrupted or deleted from your filesystem. If things aren't working in single-user mode, KDE isn't being started, so it can't have an effect.

Is sudo actually on the disc? if it is, what happens if you invoke it with a full path? If it works in that case, root's PATH variable may be messed up. I'm assuming there's nothing silly in root's /etc/passwd entry (like setting the shell to nologin or something non-existant for the home directory)

7

Wednesday, October 2nd 2013, 7:14pm

I just had the 'root locked out' problem yesterday and today, after installing FreeBSD 9.2 Release, compiling KDE4, and running
echo "exec /usr/local/kde4/bin/startkde" > ~/.xinitrc

Here is the procedure to remedy this situation:

Log into FreeBSD in Single-User mode

Type whoami, it should say root

Type df -h to determine the root device, in my case, /dev/da0p2

Run fsck, in my case, fsck /dev/da0p2

Run passwd, and reset your root password

Mount root as read write, in my case, mount -o rw /dev/da0p2 /

Find the kdmrc file, find . -name "*kdmrc*"

Edit the kdmrc file, in my case, vi /usr/local/kde4/share/config/kdm/kdmrc

In the kdmrc file, change AllowRootLogin=false to AllowRootLogin=true (this about 250 lines down from the top)
I also changed AllowShutdown to All

Save the changes, and reboot into Multi-User mode. Sign in as root.

I think that is it. Hope this helps. 8)

Don

Similar threads