Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to login as a user, but when I typed in login usr (usr is just a placeholder for the user name) the system returned:

login: Cannot possibly work without effective root. 

How can I fix this?

share|improve this question
up vote 3 down vote accepted

You can make the login command succeed by running it as root (as the error message says).

You can run login username as root by using sudo:

sudo login username

Unless you've very recently run a command with sudo in the shell you're already in, you'll first be prompted to enter your password as an administrator who is able to run commands as root with sudo.

Then the login command will run, it will prompt for username's password, and if the password is successfully entered, you'll get a login as username.

However, you probably do not need a real login as username:

  • To start a login shell as username, run:

    sudo -i -u username

    This requires no authentication except for the initial sudo authentication (when you enter your password, not username's password). Only administrators can do this.

  • To start a login shell as username, such that you are prompted for username's password (and not prompted for your own password), run:

    su - username

    Any user (except Guest) can do this, provided that they know username's password.

For more information about running commands as root, see the community documentation.

share|improve this answer

Your Answer


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.