LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Run Users and Groups launcher - not as root (https://www.linuxquestions.org/questions/linux-newbie-8/run-users-and-groups-launcher-not-as-root-4175662485/)

Super24 10-13-2019 01:09 PM

Run Users and Groups launcher - not as root
 
Is there a way to run the "Users and Groups" without having the root password? I am in the sudoers file and can work with users from the command line. But, I would like to be able to use the GUI.

TIA

TB0ne 10-14-2019 08:02 AM

Quote:

Originally Posted by Super24 (Post 6046571)
Is there a way to run the "Users and Groups" without having the root password? I am in the sudoers file and can work with users from the command line. But, I would like to be able to use the GUI.

You don't say what version/distro of Linux you're using, or what desktop environment, so it's hard to give a definitive answer. Under KDE, you can run "kdesu <command-name>", and it will run a GUI based program with elevated privileges. Gnome uses "gksu" for the same thing. You can also write a small 'shell script' with "sudo <whatever-program-name>", and add it into the launcher of your choice, and if you don't have to enter a SUDO password, the program will just come up.

However, I would strongly urge against doing this. GUI based programs as root are accidents waiting to happen, and using the CLI for admin purposes is the 'standard' way of doing things, and if you have to work on a server over the network or at a text-only console, and you rely too heavily on the GUI programs....things won't go easy.

Super24 10-14-2019 11:32 AM

Thanks. Point taken. BTW, I am running centos 6.10

scasey 10-14-2019 12:04 PM

Hmm. When I run "Users and Groups" on my CentOS 7 desktop, I have to enter my password (as for sudo) not the root password.
Which is not to disagree with TB0ne at all. Best is to do those things from the command line.

michaelk 10-14-2019 01:50 PM

Users and groups is shortcut to the system-config-users utility which is a link to consolehelper. consolehelper is a wrapper that allows an ordinary user elevated privileges for specific programs and uses pam. I will confess that I run system utilities from the desktop.

This might help.
https://wiki.centos.org/TipsAndTricks/BecomingRoot

I did not think that using your password even if you had sudo privileges would work. I just checked and CentOS 6 system-config-users uses consolehelper but CentOS 7 does not.

ondoho 10-15-2019 02:17 AM

Isn't there this thing called keyring that basically stores a user's password so they don't have to enter it again and again?
If I understand OP to be a complaint about having to enter their password (too often), the keyring should help.

Super24 10-16-2019 05:30 AM

Quote:

Originally Posted by ondoho (Post 6046983)
Isn't there this thing called keyring that basically stores a user's password so they don't have to enter it again and again?
If I understand OP to be a complaint about having to enter their password (too often), the keyring should help.

I don't mind entering a password, but as mentioned above, it is asking for the root password, not mine.

TB0ne 10-16-2019 07:26 AM

Quote:

Originally Posted by Super24 (Post 6047327)
I don't mind entering a password, but as mentioned above, it is asking for the root password, not mine.

Well, the solution of a small script as mentioned is still valid. If you are in the sudoers file and set up to not be prompted for a password, that'll do what you're after. Again, though...NOT a good or secure thing to do.

ondoho 10-17-2019 01:33 AM

Quote:

Originally Posted by Super24 (Post 6047327)
I don't mind entering a password, but as mentioned above, it is asking for the root password, not mine.

Strange.
If you enter
Code:

sudo whateverapplication
does it still ask for your root password (as per post #2)?


All times are GMT -5. The time now is 04:46 PM.