LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Can't log on as ROOT and go to GUI (https://www.linuxquestions.org/questions/mandriva-30/cant-log-on-as-root-and-go-to-gui-353059/)

checho4 08-14-2005 02:00 AM

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!

jschiwal 08-14-2005 02:44 AM

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.

checho4 08-14-2005 02:53 AM

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.

reddazz 08-14-2005 03:28 AM

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.

jschiwal 08-17-2005 03:50 PM

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 )

tkedwards 08-17-2005 05:58 PM

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.


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