[SOLVED] How do I configure sudo

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] How do I configure sudo

Postby jbarntt56 » Oct 1st, '15, 05:43

There is a program I wish to install that requires sudo. I have sudo installed, but cannot access the configuration file, I'm told I don't have rights to the dir. Is there any instructions on how to configure sudo? Ordinarily, I use su, which is easy to use. I've gone to the sudo website, but no help. I can su to root, and maybe that would give me access to the config file using vi. Any help, much appreciated.

TIA

jbarntt56
Last edited by jbarntt56 on Oct 3rd, '15, 06:26, edited 1 time in total.
jbarntt56
 
Posts: 85
Joined: Oct 11th, '14, 12:11
Location: Portland, Oregon USA

Re: How do I configure sudo

Postby Ken-Bergen » Oct 1st, '15, 05:52

In a terminal as root
Code: Select all
visudo
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: How do I configure sudo

Postby jbarntt56 » Oct 1st, '15, 06:48

Hi Ken,

Thanks for your help, but I must be missing something. I su to root, run visudo, and make the changes, but when I login w/o su and use sudo, all I get is a list of possible commands and options. I am a member of the wheel group, and I do know how to edit and save a file via vi. Any additional help would be much appreciated.

TIA,

jbarntt56
jbarntt56
 
Posts: 85
Joined: Oct 11th, '14, 12:11
Location: Portland, Oregon USA

Re: How do I configure sudo

Postby Ken-Bergen » Oct 1st, '15, 07:10

I'm not sure what you're trying to do but sudo by it's self does nothing, it must be followed by the command you wish to run as root.
Unlike su you'll be back at a user prompt afterword not a root prompt.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: How do I configure sudo

Postby doktor5000 » Oct 1st, '15, 14:14

Maybe it would help if you show us the relevant line in /etc/sudoers you added and also the complete command that you run that doesn't work as you expect including the output you get, that might help.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18060
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How do I configure sudo

Postby jbarntt56 » Oct 2nd, '15, 04:11

Hi All,

I screwed up. I actually configured sudo correctly using visudo, but then forgot that sudo is different from su, (which I am familiar with). It came to me this AM that the syntax for sudo is like vi /path/to/file/filename, as an example. Works well, and apologies for wasting your time. Thanks for holding my hand ;)

Sorry for being a dolt.

jbarntt56
jbarntt56
 
Posts: 85
Joined: Oct 11th, '14, 12:11
Location: Portland, Oregon USA

Re: How do I configure sudo

Postby doktor5000 » Oct 2nd, '15, 11:33

Please mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18060
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest