1

I have added a user in Ubuntu 12.04 LTS, but that user is setup only as "standard". I also have a user with full administrative rights (which I presume I will use to make any access rights changes).

How do I change my "standard" user to admin in Ubuntu 12.04 LTS?

Braiam
  • 67,791
  • 32
  • 179
  • 269
killagator
  • 11
  • 1
  • 1
  • 2
  • See the question here . Not the answer but the question instead. – NickTux Aug 30 '13 at 22:52
  • I found this link as useful: http://superuser.com/questions/196848/how-do-i-create-an-admin-user-on-ubuntu – Saurav Kumar Aug 30 '13 at 23:00
  • @SauravKumar - I would have just duped it to that, but you can't dupe a question to another site. I bountied to reward what I find to be the most correct answer to that question and mention it in my answer here. – RobotHumans Aug 30 '13 at 23:03

2 Answers2

4

Terminal Method

Open a terminal with CTRL+ATL+T keys combo and

Bare minimum you need to issue the following command:

sudo usermod -a -G sudo USERNAME

Replace USERNAME with the username of the user you want to promote.

sudo will ask for the password of the already existing administrator.

On my particular system, I am a member of the following groups:

usermod -a -G adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare USERNAME

Mostly a copy paste from a question I bountied on SuperUser here.

If you upvote this answer, please go upvote that one. It deserves it, as it is more correct than the more heavily upvoted and accepted answer.

GUI Method

Login from the user who is already administrator, then click on Dash (Ubuntu icon up left) write user and click on User Accounts

enter image description here

Then unlock by clicking the appropriate button and giving the administrator's password.

enter image description here

Last, click on the user you want to promote and change from Standard to Administrator.

enter image description here

RobotHumans
  • 29,530
  • It's identical to the poor, but accepted answer. – RobotHumans Aug 30 '13 at 22:56
  • @Sparhawk - It's less correct, because it doesn't mirror the default administrative user identically. It also uses a utility not specifically for the task at hand. usermod is specifically for modify users. The fact that useradd will do it is functional, but kludgy. Like logging in as root instead of using sudoers properly. – RobotHumans Aug 30 '13 at 23:06
  • @Sparhawk - I don't see an alias. I see "substitute your username here". If you want to talk about it, let's go to chat instead of cluttering up the comments. – RobotHumans Aug 30 '13 at 23:14
  • I think it's just a difference of opinion, so probably not much more to say. (For the record I was making an analogy with aliases.) Can I just ask, though, did you check to see what groups the test-user is added to in the GUI method? (As per my other comments, I run Kubuntu, so cannot check the Unity method.) – Sparhawk Aug 31 '13 at 00:34
  • @Sparhawk I did not. But if it isn't all the default groups for the original admin user, it should be reported as a bug, not validate a sub-par answer. – RobotHumans Aug 31 '13 at 02:24
  • It was not meant as such. Despite our disagreement, I bear you no grudge. It was more a question borne from curiosity, and also an attempt to help make your answer more consistent. It was not a personal attack, nor me being defensive. I'm sorry that you took it that way. – Sparhawk Aug 31 '13 at 02:34
0

Open a terminal, then add your username to the sudo group with

sudo adduser [yourusername] sudo

From the man page for adduser:

   Add an existing user to an existing group
       If called with two non-option arguments, adduser will add an existing user to an existing group.
Sparhawk
  • 6,929
  • Not as correct as it could be. Using adduser to change a user's group membership is clunky and bad. Usermod is cleaner, and the other answer includes other groups that are default for the admin user on a default Ubuntu desktop install. – RobotHumans Aug 30 '13 at 22:54
  • 1
    The adduser command will add a new user. It will not promote an existing user to administrator. !! – NickTux Aug 30 '13 at 22:54
  • @NikTh Are you sure? I'm fairly sure I've used this before on an existing user and it worked. – Sparhawk Aug 30 '13 at 22:55
  • @NikTh - If you run adduser on an existing user, it will modify the user. It works, but it's clunky and shows a google-paste instead of understanding several shell utilities. – RobotHumans Aug 30 '13 at 22:55
  • @hbdgaf 1) If the question asked for admin rights, isn't that equivalent to being added to sudo by definition? The other groups seem like they are not what has been asked for. 2) That's a bit harsh accusing me of "google-paste", since you admitted you copy-pasted anyway. And your -1 is also harsh, since it clearly does work. – Sparhawk Aug 30 '13 at 22:59
  • I read again the manual and @hbdgaf has right. adduser can add an existing user in an existing group. Although I never used this command to promote an existing user to administrator. I cannot remove the downvote though, unless you edit the answer ;-) – NickTux Aug 30 '13 at 23:02
  • @NikTh Having to edit it seems "clunky", but done nonetheless. Cheers. :/ – Sparhawk Aug 30 '13 at 23:09
  • @Sparhawk - the -1 is for quoting a less correct answer without attribution on another site. Downvoting is the same as upvoting. It's a way to say "this is how I think these answers should be ranked". Feel free to downvote my answer. It's how SE works. People vote to hopefully provide the best answer at the top. – RobotHumans Aug 30 '13 at 23:11
  • @hbdgaf: Incorrect. Downvoting is not a way to rank. To quote from the help page: "Use your downvotes whenever you encounter an egregiously sloppy, no-effort-expended post, or an answer that is clearly and perhaps dangerously incorrect." http://stackoverflow.com/help/privileges/vote-down – Sparhawk Aug 30 '13 at 23:14
  • @Sparhawk do not feel clunky. This is how AU works. I thought your answer was completely wrong so I downvoted. The I saw that I was wrong, but there is a lock period of 7 minutes and passed, so I was unable to revert my downvote. Other people use downvotes just for fun, others use them more easily, I use them only when an answer is not clear or completely wrong. Although I would prefer another edit, to add some specifications e.g (copy-paste the section from manual) and tell to user how to open the terminal (CTRL+ALT+T). – NickTux Aug 30 '13 at 23:15
  • @Sparhawk - That's just a way to tell people not to downvote willy-nilly when they're new. There's more than one reason I downvoted your answer. Check that chat conversation here: http://chat.stackexchange.com/transcript/message/11020956#11020956 – RobotHumans Aug 30 '13 at 23:43
  • @NikTh Thanks for the constructive criticism. I've added the relevant quote from the man page. (I don't like to specify how to open the terminal, since it's not the same for everyone. For example, I use Kubuntu, so I'm quite sensitive to this.) – Sparhawk Aug 31 '13 at 00:29
  • @hbdgaf I think we have an irreconcilable difference of opinion about what the purpose of downvoting is. I can accept that you think that your answer is more appropriate, but I think my answer is also correct, but approaches the problem from a different angle. However, I appreciate that you reached out to the community to see what the consensus on downvoting was. (And also, me downvoting you seems inappropriate given my opinion on downvotes, and petty to boot!) – Sparhawk Aug 31 '13 at 01:02
  • You're welcome to your opinion. And we do disagree. Moving on. – RobotHumans Aug 31 '13 at 02:18