Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
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 at 23:10
add comment

3 Answers 3

up vote 4 down vote accepted

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.

share|improve this answer
    
The first one you said is the easiest way. Thanks. –  TomJ May 29 at 16:03
add comment

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)
share|improve this answer
    
I also got 4(adm). So am I the administrator ? –  TomJ May 29 at 15:42
    
@tom means he want to know if he is a root or not –  nux May 29 at 15:58
    
@nux Why do you think so? –  Jacob Vlijm May 29 at 16:00
    
from the title , " The administrator of my ubuntu " –  nux May 29 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. –  Gilles May 29 at 16:04
show 5 more comments

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 .

share|improve this answer
    
What you mean by this - "id - u (yourusername) " ? will you explain it a little ? –  TomJ May 29 at 15:40
    
check linfo.org/uid.html –  nux May 29 at 15:41
    
Mine is $. So am I the administrator ? –  TomJ May 29 at 15:43
1  
@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. –  Gilles May 29 at 16:03
    
administrator is a standard user , isn't it ? –  nux May 29 at 16:07
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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