April 18, 2015, 11:30:24 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
Author Topic: how can I allow another user to "sudo" anything root can do?  (Read 3247 times)
Posts: 11

« on: May 20, 2007, 06:51:56 pm »

I have another user account, not root, and whenever I sudo something; it says I do not have the appropriate permissions. How can that be changed?
Posts: 2567

« Reply #1 on: May 20, 2007, 07:58:30 pm »

Why are you using sudo? Perhaps you are used to Ubuntu.

In VectorLinux, if you as user need to do something that requires root, use su. Open a terminal and type
at the prompt. Then type the root password. You can now run commands reserved for root and do other root things, such as edit system files, create directories somewhere other than in your home directory, install software system wide, etc.

When you're finished with whatever you need to do, type
at the terminal prompt. That will return you to your user account.

If the situation is that you want your user to be able to do some things that require root privileges without revealing the root password to that user, you can add the user to groups that have permission to do the desired things. If that's not enough, you as root can edit /etc/sudoers to let a particular user sudo to have access to some commands.

I don't know much about editing /etc/sudoers, so if you need more information about that, someone else will have to step in.
« Last Edit: May 20, 2007, 08:06:01 pm by GrannyGeek » Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
Posts: 340

« Reply #2 on: May 21, 2007, 12:38:35 am »

You can add a line such as:

majinzero   ALL=NOPASSWD:ALL

to your '/etc/sudoers' file and then the user named "majinzero" will be able to perform operations as root using the 'sudo' command.

The 'sudoers' file is fairly well commented and you should be able to figure out the other options available to you. See also the manual page on "sudoers".

A complex system that works is invariably found to have evolved from a simple system that works.
Posts: 46

« Reply #3 on: May 21, 2007, 06:17:35 am »

Note that to edit the /etc/sudoers file you will need to be root and use visudo rather than your usual editor - sudoers file won't allow any other editor to change it.

Posts: 2499

« Reply #4 on: May 21, 2007, 08:54:06 am »

Note that to edit the /etc/sudoers file you will need to be root and use visudo rather than your usual editor - sudoers file won't allow any other editor to change it.
Actually, you can use any editor you want, but it's supposed to be very dangerous not to use visudo. The word is you can leave your system inaccessible with a bad sudo file and visudo checks the format before saving. That said, I only tried visudo once or twice before starting to use mcedit, kate, mousepad, or whatever... Roll Eyes
« Last Edit: May 21, 2007, 09:02:10 am by Joe1962 » Logged

O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
Running: VL 7 Std 64 + self-cooked XFCE-4.10
Triarius Fidelis
Posts: 2399

Domine, exaudi vocem meam

« Reply #5 on: May 21, 2007, 07:14:56 pm »

You can have your cake and eat it, too. Just set $VISUAL or $EDITOR to program of choice.

(Myself, I'm fine with using the crappy vi clone we have by default...)

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!