| Ubuntu This forum is for the discussion of Ubuntu Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-16-2007, 10:27 AM
|
#1
|
|
Member
Registered: Mar 2004
Location: Annapolis, Maryland, USA
Distribution: Ubuntu 11.04, Mint 11.11, Xubuntu 11.11
Posts: 455
Rep:
|
Understanding sudo
I have myself and my kids set up on my laptop. When I was logged in as one of my kids I needed to configure the wireless connection as it was not working when I logged in as her. I tried to go into admin mode in the KDE System Settings. When it would ask for the password I typed in mine and it would not except it. I opened a terminal and su to me and tried again, I just got an su error dialog popup. Can I set up my kids accounts to be able to use MY password for admin tasks? I do not want them to be able to use theirs, but I would like to use mine if I am logged in as them if need be.
Thanks,
Todd
|
|
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
06-16-2007, 11:19 AM
|
#2
|
|
Senior Member
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 2,962
Rep: 
|
If you hit [ctrl]+[alt]+[F1-6] from X you can open a console and sign in as yourself, and [alt]+[F7] to get back into X. What admin tasks do you need to perform? I don't think there is any safe way to make it "easy" for them to use your account. You can't "setuid" a script, and it would be unsafe to have a "setuid" program that doesn't perform verification.
ta0kira
|
|
|
|
06-16-2007, 12:09 PM
|
#3
|
|
Member
Registered: Mar 2004
Location: Annapolis, Maryland, USA
Distribution: Ubuntu 11.04, Mint 11.11, Xubuntu 11.11
Posts: 455
Original Poster
Rep:
|
For some reason the wireless NIC was not enabled when I logged into my daughter's account. I needed root privileges to do this and I could not figure out how to get them. I am not quite getting the sudo thing. I would like to just type in the 'root' password when logged in as whomever to do admin type work. Guess I need to figure this out
Thanks,
Todd
|
|
|
|
06-16-2007, 01:46 PM
|
#4
|
|
Moderator
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,088
|
Using sudo means that you don't need to know the root password. Sudo allows you to act as admin using your own account and password.
If you wish to perform an admin task while logged in as your daughter, do
Code:
sudo <the command>
<your daughter's password>
and you will be able to do whatever. If you are logged in as you, put in your own password, of course.
Lastly, check out
|
|
|
|
06-16-2007, 05:38 PM
|
#5
|
|
Member
Registered: Mar 2004
Location: Annapolis, Maryland, USA
Distribution: Ubuntu 11.04, Mint 11.11, Xubuntu 11.11
Posts: 455
Original Poster
Rep:
|
I realize that I can put my daughter in the sudoers file and then they can perform root type commands by using their password; however, I do not want to give my 11 year old admin access (for obvious reasons). Sometimes the need pops up when I need to do an admin task when my daughter is logged in and as I do not want to give her root access I was wondering if I could somehow set it up to allow her account root access but only if she uses my password (which she does not know). That way I can do admin tasks while she is logged in. Is this even possible? Does it even make sense?
Thanks
|
|
|
|
06-18-2007, 10:40 AM
|
#6
|
|
Member
Registered: Sep 2004
Location: Dayton, Oh
Distribution: Linux Mint 10, Linux Mint 11
Posts: 148
Rep:
|
Please note that I do not know very much about sudo, but I am fairly certain that you can enable certain commands. Can't you identify what administrative tasks would be needed while in your daughter's account, and just add those commands to sudo, such as enabling your wireless card? It would allow her to start the card without giving her access to the entire system.
|
|
|
|
06-18-2007, 02:02 PM
|
#7
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
Why not simply enable the root account?
sudo passwd root
Then you can use su to become root--just like any normal distro.
The ONLY flaw in Ubuntu--root disabled by default
|
|
|
|
11-26-2012, 08:49 PM
|
#8
|
|
LQ Newbie
Registered: Nov 2012
Posts: 3
Rep: 
|
Quote:
Originally Posted by leupi
I have myself and my kids set up on my laptop. When I was logged in as one of my kids I needed to configure the wireless connection as it was not working when I logged in as her. I tried to go into admin mode in the KDE System Settings. When it would ask for the password I typed in mine and it would not except it. I opened a terminal and su to me and tried again, I just got an su error dialog popup. Can I set up my kids accounts to be able to use MY password for admin tasks? I do not want them to be able to use theirs, but I would like to use mine if I am logged in as them if need be.
Thanks,
Todd
|
I have been having a problem similar to this, only when I type sudo <cmd> (i.e sudo apt-get install yada) it asks for my user (not root) password. When I type that in, it tells me "yada is not in the sudoers file. This incident will be reported." My question is, HOW do I put yada in the sudoers file?
|
|
|
|
11-26-2012, 09:42 PM
|
#9
|
|
Senior Member
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Peppermint
Posts: 3,388
|
Generally on most distributions using sudo, the first user created during installation will have sudo rights. You can add other users to the sudoers list by editing the list. Instructions at the site below as well as numerous other sites.
http://www.pendrivelinux.com/how-to-...-sudoers-list/
The problem you are going to have is that you will need to edit the file with root privileges so you will need the password for a user that has sudo privileges. Do you have other users? You should be able to do it from a Live CD.[COLOR="Silver"]
Last edited by yancek; 11-26-2012 at 09:43 PM.
|
|
|
|
11-27-2012, 08:34 AM
|
#10
|
|
Senior Member
Registered: Feb 2009
Posts: 3,138
|
Quote:
Originally Posted by BriteLeaf
I have been having a problem similar to this, only when I type sudo <cmd> (i.e sudo apt-get install yada) it asks for my user (not root) password. When I type that in, it tells me "yada is not in the sudoers file. This incident will be reported." My question is, HOW do I put yada in the sudoers file?
|
Highly recommend to read here:
https://help.ubuntu.com/community/RootSudo
Code:
In the terminal (for Precise Pangolin, 12.04), this would be:
sudo adduser <username> sudo
where you replace <username> with the name of the user (without the <>).
|
|
|
|
11-27-2012, 10:29 PM
|
#11
|
|
LQ Newbie
Registered: Nov 2012
Posts: 3
Rep: 
|
Quote:
Originally Posted by snowpine
Highly recommend to read here:
https://help.ubuntu.com/community/RootSudo
Code:
In the terminal (for Precise Pangolin, 12.04), this would be:
sudo adduser <username> sudo
where you replace <username> with the name of the user (without the <>).
|
I know you are NOT going to believe this, but I went to the main account, used the sudo adduser <username> sudo command, I got CONFIRMATION that <username> had indeed been added, then went back to my user, tried to sudo, and got the same error.
I tried both username's password, and root password. Root password says not user's password. User's password says "<username> is not in the sudoers file. This incident will be reported."
Strangely enough, if I go to the Main User and try to auth as root, I even get the Auth Failed error, and I KNOW I am using the correct password there.
Anyway, thank you for trying to help me in this matter.
Oh, btw, I am using Precise Pangolin, 12.04 LTS
|
|
|
|
11-28-2012, 01:57 AM
|
#12
|
|
Senior Member
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,121
|
Quote:
Originally Posted by BriteLeaf
I know you are NOT going to believe this, but I went to the main account, used the sudo adduser <username> sudo command, I got CONFIRMATION that <username> had indeed been added, then went back to my user, tried to sudo, and got the same error.
I tried both username's password, and root password. Root password says not user's password. User's password says "<username> is not in the sudoers file. This incident will be reported." ...
|
Do you mean that nobody can use sudo now? Does this include you as well??
If so, then see this to fix a broken sudo: http://www.psychocats.net/ubuntu/fixsudo
You may be able to use the Case 1A listed there to add your daughter to the sudo file.
The Case 1B listed there should be able to fix your ability to sudo if that is broken.
|
|
|
|
11-28-2012, 07:11 AM
|
#13
|
|
Senior Member
Registered: Feb 2009
Posts: 3,138
|
I don't understand what you mean by "root password." There is no root password in Ubuntu; the root account is locked.
tommcd's link is highly recommended: http://www.psychocats.net/ubuntu/fixsudo
|
|
|
|
11-28-2012, 07:45 AM
|
#14
|
|
LQ Newbie
Registered: Jan 2006
Location: Bel Air MD
Distribution: Fedora
Posts: 12
Rep:
|
I manage several Fedora 16 boxes that is used by several software developers. The developers need to restart particular servers, apache, tomcat, and jboss, fairly frequently. So what I so is have group setup in sudoers file that can run the set of commands needed by the developer, and only that set of commands. Any user who belongs to that group can restart the servers. This way I give folks just enough admin rights to get their job done and not enough to screw up the server environment.
|
|
|
|
11-28-2012, 11:57 PM
|
#15
|
|
Member
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 12.04 LTS
Posts: 156
Rep:
|
Quote:
Originally Posted by BriteLeaf
I know you are NOT going to believe this, but I went to the main account, used the sudo adduser <username> sudo command, I got CONFIRMATION that <username> had indeed been added, then went back to my user, tried to sudo, and got the same error.
I tried both username's password, and root password. Root password says not user's password. User's password says "<username> is not in the sudoers file. This incident will be reported."
Strangely enough, if I go to the Main User and try to auth as root, I even get the Auth Failed error, and I KNOW I am using the correct password there.
Anyway, thank you for trying to help me in this matter.
Oh, btw, I am using Precise Pangolin, 12.04 LTS
|
Did you log out as <username> and then log back in, after adding the group and before trying sudo? The list of sudoers in RAM is only updated at login time, so changes made in a session won't take effect until after the next login.
|
|
|
2 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:19 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|