Sign in with
Sign up | Sign in
Your question

User not in sudoers file

Last response: in Linux/Free BSD
Share
February 24, 2013 6:01:52 PM

hello

i am setting up a computer to run xubuntu, i want to be able to connect to that computer so that person who is going to use that computer (who is not tech savvy) doesn't have to worry about administering that computer in any which way possible. i have ssh running and i set up a separate user account on that computer for the person who will be using that computer (who is not tech savvy) to use, i can log in to that computer using that non-admin account but i can't run any sudo commands. i tried to give that non-admin account sudo rights but it won't let me, it defeats the purpose of having a non-admin account but i want to be able to administer that computer with out that person doing anything. i have an admin account set up on that computer and i have sudo rights on that account. what do i do?
basically i'm trying to idiot proof that computer as much as possible, hopefully this question doesn't make me sound like an idiot :p 

PLEASE HELP!!

thank you

More about : user sudoers file

February 24, 2013 6:11:32 PM

log in as root, add user to /etc/sudoers with command 'visudo'

better idea: if you are just administering remotely, simply issue the super user command, 'su', to log in as root.
this way the non-admin account does not need to be added to sudoers.
m
0
l
February 24, 2013 7:58:55 PM

"sudo" is a safer command than "su", so I'd try to get it working. When you say "it won't let me" give sudo rights to the non-admin account, what have you done to do so? I'm not familiar with xubuntu, but on most distributions the easiest way to do this is to add the user to the "wheel" group. If that group is not already authorized to sudo it it trivial to change; the /etc/sudoers file almost certainly contains a commented-out entry for wheel, and you just need to remove the hash to enable it. As skittle says, use "visudo" to edit this file, not any other editor.
m
0
l
Related resources
February 25, 2013 2:34:14 AM

depends on definition of safer. with sudo the non-admin account effectively has root access. just using su lets you issue commands as root without the non-admin its self having root
m
0
l
February 25, 2013 5:25:46 AM

Safer in the sense that "sudo" is (normally) used for a single command, and only requires that the user knows their own password, whereas "su" is (normally) used to get a root command prompt, and requires knowledge of the root password. So, IMO, it is safer to use "sudo" for those commands that need it and the normal user access for commands that don't.

An example is compiling and installing a program (or the kernel). The recommended procedure is, as a non-root user:

./configure
make
sudo make install
m
0
l
February 25, 2013 6:16:52 PM

i managed to solve my problem. i added the non admin account (the "desktop-user" as xubuntu would call it) to the sudo group. its not what i wanted to do but it worked. my question on my quest to "idiot proof' my system is how do i block certain commands and applications for the non admin account?
m
0
l
February 25, 2013 6:32:54 PM

/etc/sudoers can be highly customized to allow/disable commands https://wiki.archlinux.org/index.php/Sudo

or as I mentioned earlier, do not give user sudo at all. simply execute commands as root/su when you need them.

or have sudo as for root password, which presumably a non-admin should never have, instead of user password.
m
0
l
!