15

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

Braiam
  • 67,791
  • 32
  • 179
  • 269
TomJ
  • 566
  • 2
  • 8
  • 20
  • 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

3 Answers3

10

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.

9

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)
Jacob Vlijm
  • 83,767
2

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 .

nux
  • 38,017
  • 35
  • 118
  • 131