basic sudo / sudoers configuration

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

basic sudo / sudoers configuration

Postby philip » Dec 28th, '12, 18:27

Afraid this is very basic - I'm trying to use Mageia to learn about Linux. So how do I use the sudo command? I have tried, and get a window asking me to enter my user password (my password, not the root password). But when I do that I'm told that I' not on the sudoers list. So how do I get on the list? My machine is only used by me, so there are really no security issues here.
Philip.
Last edited by doktor5000 on Dec 28th, '12, 22:51, edited 1 time in total.
Reason: adjusted thread title
philip
 
Posts: 4
Joined: Dec 28th, '12, 18:23

Re: sudoers

Postby oj » Dec 28th, '12, 18:49

edit /etc/sudoers by hand as root. Look for the root entry, copy it, paste it on a a new line directly beneath and change the user name from root to whatever your user. Example:

Code: Select all
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL  <copy this
root    ALL=(ALL)       ALL  <paste here

then change the second one to your user:


## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL 
jeff    ALL=(ALL)       ALL  <change root to user name you want to give sudo access to
oj
 
Posts: 232
Joined: Aug 23rd, '12, 00:22

Re: sudoers

Postby philip » Dec 28th, '12, 20:02

Thanks muchly - that seems to be what I needed to know.
Philip.
philip
 
Posts: 4
Joined: Dec 28th, '12, 18:23

Re: sudoers

Postby isadora » Dec 28th, '12, 20:34

Philip,mark the topic [SOLVED]? ;)
Thanks!!!
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2766
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: basic sudo / sudoers configuration

Postby djennings » Dec 28th, '12, 23:50

When editing the sudoers file the safest way to do it is using the
Code: Select all
visudo
command.
For the reason why see
Code: Select all
man visudo
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: basic sudo / sudoers configuration

Postby philip » Dec 29th, '12, 23:10

Sorry, but how does one mark a topic as SOLVED?
Philip.
philip
 
Posts: 4
Joined: Dec 28th, '12, 18:23

Re: basic sudo / sudoers configuration

Postby isadora » Dec 29th, '12, 23:16

Edit your first post in this topic.
Put [SOLVED] in front of the subject/title, that will do. ;)

Thanks.
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2766
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: basic sudo / sudoers configuration

Postby doktor5000 » Dec 29th, '12, 23:17

By editing the first post of the thread and prefixing the topic with [SOLVED].

But as i've moved the thread in between into the Tips, tricks and solutions subforum, might not be possible for you anymore,
but please try as described and post if you have the permissions or not. If you don't, i'll mark it as solved.
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: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: basic sudo / sudoers configuration

Postby philip » Dec 31st, '12, 19:01

Problem: I don't even know how to edit earlier posts. I really am right at the beginning of this Linux.
Philip.
philip
 
Posts: 4
Joined: Dec 28th, '12, 18:23

Re: basic sudo / sudoers configuration

Postby doktor5000 » Dec 31st, '12, 19:20

When you are logged in to the forums, with this button inside your post: Image
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: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest