1

the account is active, and I can log in using a TTY but mot through the GUI. when logged it shows the same image active with the other user account but a message saying:

No directory, logging in with HOME=/  

running

$ sudo apt-get update  

get

E: could not get lock /var/lib/dpkg/lock - open (11: resource temporarily unavailable)  
E: unable to lock the administrative directory (/var/lib/dpkg), is another process using it?  
2
  • How exactly did you create the new account? it sounds like you didn't create/assign a home directory for it. The apt-get update error is probably an unrelated issue. Jun 11, 2015 at 3:47
  • yes that was the problem. its OK now Jun 11, 2015 at 4:29

1 Answer 1

0

No directory, logging in with HOME=/

This shows you haven't create a home for the newly created user. I suppose you use useradd command without -d option:

man useradd

   -d, --home HOME_DIR
       The new user will be created using HOME_DIR as the value for the
       user's login directory. The default is to append the LOGIN name to
       BASE_DIR and use that as the login directory name. The directory
       HOME_DIR does not have to exist but will not be created if it is
       missing.

The directory will not be created if it is missing.

So it's better to not use useradd, use adduser instead.

E: could not get lock /var/lib/dpkg/lock - open (11: resource temporarily unavailable) E: unable to lock the administrative directory (/var/lib/dpkg), is another process using it?

Now this error means that there is another process using dpkd. So to solve this

  • either wait to end that process(mainly this raise when you open software center and trying to install from terminal),
  • Kill the old process by searching for it using ps aux | grep dpkg then kill -9 PID
  • or you can remove the lock file

    sudo rm /var/lib/dpkg/lock
    sudo rm /var/cache/apt/archives/lock
    

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.