Is there a way to know whether am the administrator of my Ubuntu 14.04 ? If not, how can I became the administrator ?

  • Note that though you keep saying "the administrator", all the answers have spoken of whether or not you are "an administrator". There isn't necessarily a sole administrator (unless you perhaps count the root account, which is normally disabled). You can very well have a hundred administrators on a machine.
    – Jon Hanna
    May 29 '14 at 23:10

Simply type id in a terminal. It outputs user id, group id, and group memberships of your account. In my case:

UID=1000(jacob) GID=1000(jacob) groepen=1000(jacob),4(adm),24(cdrom),27(sudo),30

"27(sudo)" means I am member of the group "sudo", and that I have the option to run commands with sudo, in other words: I am an administrator.

In comparison, a "normal" user's output:

UID=1001(testpersoon) GID=1001(testpersoon) groepen=1001(testpersoon),1000(jacob)

To turn a "normal" user into an administrator, add the user to the group sudo:

sudo adduser <username> sudo  (from an administrator's user account)
  • I also got 4(adm). So am I the administrator ?
    – TomJ
    May 29 '14 at 15:42
  • @tom means he want to know if he is a root or not
    – nux
    May 29 '14 at 15:58
  • @nux Why do you think so? May 29 '14 at 16:00
  • from the title , " The administrator of my ubuntu "
    – nux
    May 29 '14 at 16:01
  • 1
    @nux Being an administrator means having the right to run programs as root. It doesn't mean using the root account all the time. May 29 '14 at 16:04

In the default GUI, open the System Settings and go to the “User Accounts” tool. This shows your “Account Type”: “Standard” or “Administrator”.

On the command line, run the command id or groups and see whether you are in the sudo group. On Ubuntu, normally, administrators are in the sudo group.

You may have administrative access if you've been directly added to the list of sudoers — this is more likely if the administrator is familiar with Linux or Unix in general and didn't use the default Ubuntu method. Try running sudo echo ok and enter your password; if this prints ok, you're an administrator.

  • The first one you said is the easiest way. Thanks.
    – TomJ
    May 29 '14 at 16:03

By default root account is disabled in ubuntu , root account has UID = 0 , try :

id and see what is the output , if its other than zero you are not the root .

But you can check if you can use root privileges by sudo :

sudo -v

If you cant it will state :

Sorry, user [username] may not run sudo on [hostname].

Another tips when you open terminal :

If $ at the end of the prompt that means standard user .

If # that means root user

In my case nux@ubuntu-PC:~$

That means i am a standard user .

  • What you mean by this - "id - u (yourusername) " ? will you explain it a little ?
    – TomJ
    May 29 '14 at 15:40
  • check linfo.org/uid.html
    – nux
    May 29 '14 at 15:41
  • Mine is $. So am I the administrator ?
    – TomJ
    May 29 '14 at 15:43
  • 2
    @Tom Even if you are an administrator, your prompt will normally show $. The prompt only shows # if the shell is running as root. If you merely have the right to run programs as root (which is the definition of being an administrator), that doesn't affect your prompt. May 29 '14 at 16:03
  • administrator is a standard user , isn't it ?
    – nux
    May 29 '14 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.