Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.


  Search this Thread
Old 08-14-2005, 02:00 AM   #1
LQ Newbie
Registered: Aug 2005
Distribution: Kubuntu 7.04
Posts: 14

Rep: Reputation: 0
Can't log on as ROOT and go to GUI

Hi. I'm a newbie when it comes to Linux. One of the concepts that is fairly new to me is the use of Users and SuperUsers. I can log on as a User and get to KDE or GNOME, but I cannot log on as Root and get to KDE or GNOME. All I can do is use the tty1 through tty5 screens. I am running Mandrake 10.0. Any help is much appreciated. Thank you!
Old 08-14-2005, 02:44 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
It is possible that the security settings do not allow a root login. You may be able to change this in the Users and Security section of MCC. It may also be that root simply doesn't show up in the KDM or GDM login manager. Can you enter 'root' as the user name manually.
Of course when logged in as a normal user, you could 'su' to root in the shell, or use kdesu to start a X windows program. This would be preferable to logging into an X windows session as root anyway.
Old 08-14-2005, 02:53 AM   #3
LQ Newbie
Registered: Aug 2005
Distribution: Kubuntu 7.04
Posts: 14

Original Poster
Rep: Reputation: 0
I really do thank you for that, but is there any way that you can explain it in a more step by step fashion??? I really am new to this whole Linux thing, and I don't know what most of these acronyms and symbols are. Thank you.
Old 08-14-2005, 03:28 AM   #4
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Most distributions do not allow root logins into a gui environment through gdm or kdm because of security issues and risk of damaging your system. If you need to do any sysadmin tasks, then use the switch user command (su or su -) to switch to root and perform them in the cli. You can also use the "kdesu", gnomesu or "gksu" rograms to run graphical programs as root whilst logged in as another user. Another good command is "sudo" which gives users certain root privileges. If you really need to login to root using kdm or gdm, then change this in kcontrol for kdm or run gdmsetup for gdm.
Old 08-17-2005, 03:50 PM   #5
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
I am using SuSE currently, and I don't remember the exact name of the module where the security settings are made. The MCC stands for Mandrake Control Center. It is a link to a program called "drakconf". This is the starting point for configuring your computer if you are using Mandrake Linux (now Mandriva).

However, I would recommend using the 'su' program in the shell to temporarily become root. Using 'su -' does the same thing but also sets up root's environment, such as the PATH variable.

If there is a GUI interface in the MCC program to do what you want, then I would use that. For example, Mandrake linux and others ( but not slackware ) use a system called PAM to control authentication. Each distro will have the configuration set up a bit differently. So using the tools that they provide would be a good idea, just so that you don't miss something.

If you want to start a GUI type program as root, you could start it using the KDE program "kdesu"

Entering "kdesu <program-name>" will get you a root password dialog. This would enable you to manually edit configuration files in /etc and save them for example.

If there is a program that you often use a root, there is another way which can save a few steps. Dragging the icon from the menu onto the toolbar, right clicking, and under advanced properties, select "run as a different user".
Enter root as the user. Later, you simply need to click on the icon on your toolbar and enter the root password.

Yet another way is to use the 'visudo' program (from the shell) in order to edit the /etc/sudoers file. This file is well commented. To be able to use the 'sudo' program, simply remove the octothorpe character "#" in front of the line with the word "wheel" in it. Then make yourself a member of the "wheel" group. The "wheel" group is used to give certain members some administrative rights. I don't know why the word "wheel" was chosen, but this is a standard name used in other distro's as well.

Now to run a single command as root, prepend the command "sudo" in front of the command line.
For example:
sudo /sbin/ldconf

Using Mandrake, you will enter your own password, while on other distro's you enter the root password. ( I prefer the way Mandrake does this, because it allows other users to run certain administration commands as root, without giving out the root password )
Old 08-17-2005, 05:58 PM   #6
Senior Member
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
If you don't want to use the command line:
If you're running the KDE desktop (the default in Mandrake) you can go menu->Run Command and in the dialog that comes up (similar to the Windows 'run' dialog) click options. There you will see an option to 'run as a different user'. You can now easily run individual programs as root as you need them, which is the way its meant to be done. Also remember that some programs (eg. the Mandrake Control Centre) are setup to always ask for your root password when you run them regardless.

On the command line:
Look up the man pages for su and sudo

As for logging in as root this is a simple display manager setting. The display manager is the program that shows the graphical logon prompt you get when you start your linux system (or logout from an existing session). You can easily change its settings to allow root logins BUT DON"T because there's no need and it could cause a lot of problems for you if you stuff something up. I can't remember where the settings are now but there are plenty of posts around the net or on this message board where people have asked this same question.


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
newbie > root can log in to a gui, users suddenly can't Influx Slackware 18 10-09-2005 10:09 AM
Cant only log in as root after user log-in. ADJenkins Linux - General 2 11-17-2004 04:18 PM
Can't log into GUI with root Oeli Linux - Newbie 5 11-28-2003 09:10 AM
How to log in (root) without GUI thenewbster Mandriva 4 09-20-2003 03:44 PM
Log on as Root, or switch to Root, in MDK 9.1 - KDE 3.1.0 snorky Mandriva 3 09-01-2003 12:07 PM > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 11:28 PM.

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