LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mandriva GUI Root: Is there such a thing? (https://www.linuxquestions.org/questions/linux-newbie-8/mandriva-gui-root-is-there-such-a-thing-756626/)

theKbStockpiler 09-20-2009 05:17 PM

Mandriva GUI Root: Is there such a thing?
 
I understand that Mandriva has stricter rules on Root privileges more so than let's say Ubuntu. I'd like to work from the outside in on this problem. If a system program/application dose not show a dialog box prompting a root user password, does the operation have to be done in the terminal such as Bash? As a user of a shell Mandriva will not allow me to do these things and it seems too out of the way to use system commands. Mandriva as far as I know does not allow the root user to use GUI unless prompted. Any suggestions?
Thanks in advance
I edited this. If you create a root account Mandriva still requires you to enter a root password so this option has no benefit.Also on a root account you obviously have a different desktop. So I guess the answer is to create a user group that is the same as root and don't create files etc while in root mode. I'll try this.

GlennsPref 09-20-2009 07:17 PM

Hi, one way to get the gui for root is to select "console" to login from the login screen.

you should get a shell prompt.

Type in root and enter root password.

Type startx and you should be taken to root gui. (As I see it (the question))

The other thing to do is to add your "user" to the wheel group.

Edit the /etc/sudoers file
Code:

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
%wheel  ALL=(ALL) ALL

# Same thing without a password
%wheel  ALL=(ALL) NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

to edit as root type...

su -p
(enter root password)

vi /etc/sudoers

Once in vi use "i" to insert (edit)

use arrow keys to navigate....

Uncomment the lines....

use "Esc" to exit insert mode

use ":wq" to write to file and quit vi

see how you go.

Regards Glenn

<edit> reboot or restartx to test. </edit>

David the H. 09-20-2009 08:06 PM

There's never any good reason to run a whole gui x-session as root. Anything you need to do can be just as easily done in other ways. There are several ways to launch gui programs with root privileges.

You can run almost any application as root by using the gksu or kdesu commands (depending on your desktop). These are the programs that provide the gui for entering the root password. e.g. "gksu gedit". You can also use them in your menu and icon launcher commands.

Sudo is also a good option, as the previous post detailed. There are even gksudo and kdesudo gui versions of the command as well that work similarly to gksu and kdesu, except that the programs must be configured properly in sudo first.


To run a gui program directly from a root terminal without needing any of the above commands you need to have two things set up. First, the running x-server must be configured to allow root to access it. That's most easily done with "xhost +local:root", run by the user that owns the x-session (it's not the most secure method, but for most home systems it's not a big worry). Second, the root user's environment must have DISPLAY=:0.0 set (or whatever the actual display is), so that the programs know which display to use.

theKbStockpiler 09-21-2009 03:35 PM

Thanks
 
Thanks for the great in depth responses. I appreciate you taking the time to share your expertise. The information you have provided is topnotch. From my own perspective I don't respect why a computer user can't be given an extra password when it is needed. It seams the hierarchy causes a burden that is not worth it. If as a user on Mandriva when you are prompted for a password you either have it, you can get it, or you have restricted use for a reason. You can accomplish your tasks eventually but it is labor intensive. Most people don't want hierarchy for the sake of hierarchy. If you are the root it would seam that you have to use the terminal and not the GUI which is okay as long as you know. Having a root account that doesn't have any privileges doesn't make sense. The root privilege thing amounts to a (dummy switch) if it is your own computer.

Thanks also for answering Mandriva questions as Ubuntu has pretty much taken over.

GlennsPref 09-21-2009 08:50 PM

Hi, I don't agree entirely, but Mandriva is more secure than most other Nix's default settings.

You can and may change the system to allow root access if and when you need it, I do.

I also have a single-user system.

When you setup ksudo or gtksudo, the gui for password should pop up anytime you select an operation that requires root privs.

I go one step further and use zsh instead of bash, I can set aliases for common commands that require root passwords. Seemless intergration.

Not secure for multi-user systems, but nice for us.

regards Glenn


All times are GMT -5. The time now is 03:28 AM.