user not in sudoers
Doug
dmcgarrett at optonline.net
Thu Apr 14 02:25:59 UTC 2011
On 04/13/2011 04:23 PM, Todd Edwards wrote:
> Edit the file /etc/sudoers and add yourself there. Although deemed a
> security risk by the Ubuntu community you can also change the root
> password and become root as you can when using Fedora, CentOS, etc...
> Just add yourself to the sudoers file above and do sudo passwd to change
> root's password. Sudo has some pretty strict file permissions so you'll
> need to chmod it to something you can edit like 700 and then chmod it
> back to I believe 440 (if you get this step wrong it will tell you what
> the permissions need to be when you try to use sudo).
>
> -- Todd Edwards
>
> On Wed, 2011-04-13 at 12:57 -0700, Johan Scheepers wrote:
>> Good day,
>>
>> Not used to ubuntu. Using Fedora, Centos, Mandriva.
>>
>> Want to use and and learn ubuntu.
>>
>> While waiting for ubuntu 11.04, I installed 10.10 to get used to it.
>> Now this sudo term. When I use sudo for a root command it tells me I am
>> not in the sudoers file.
>>
>> This is annoying. How do I get myself (user) in the sudoers file.
>> This is at home and I am the only user.
>>
>> I am used to become root when required and get out when finished. Would
>> rather have the OS operating as I am used to.
>>
>> Kindly some advice please.
>> Thanks
>> Johan S
You're supposed to use visudo to edit the sudoers file. visudo uses vi
commands,
which you'll have to look up, if you're not familiar with them. The
reason is that
visudo checks the file for errors before letting you save it.
Here is my sudoers file--just copy it with your username instead of
mine. Be careful
with the # lines. They are comments. You will probably have to remove
one or two #s
to set it up--it's been a while, so I don't remember exactly. Also be
careful to duplicate
all spaces, just as you see them. Don't add or subtract any.
___________________________________________________________________________________
___________________________________
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Defaults syslog=auth
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
#%wheel ALL=(ALL) ALL
# Same thing without a password
#%wheel ALL=(ALL) NOPASSWD: ALL
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
doug ALL=(ALL) ALL
______________________________________________________________________________
--doug
--Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110413/33a8e49e/attachment.html>
More information about the ubuntu-users
mailing list