Page 1 of 1

[SOLVED] How do I configure sudo

PostPosted: Oct 1st, '15, 05:43
by jbarntt56
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

Re: How do I configure sudo

PostPosted: Oct 1st, '15, 05:52
by Ken-Bergen
In a terminal as root
Code: Select all
visudo

Re: How do I configure sudo

PostPosted: Oct 1st, '15, 06:48
by jbarntt56
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

Re: How do I configure sudo

PostPosted: Oct 1st, '15, 07:10
by Ken-Bergen
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.

Re: How do I configure sudo

PostPosted: Oct 1st, '15, 14:14
by doktor5000
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.

Re: How do I configure sudo

PostPosted: Oct 2nd, '15, 04:11
by jbarntt56
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

Re: How do I configure sudo

PostPosted: Oct 2nd, '15, 11:33
by doktor5000
Please mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks