Server Fault is a question and answer site for system and network administrators. 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

Help! I'm desperate :)

I can't login as any user other than root. I'm on Ubuntu 10.04.

Here's command output:

root@pinky:~# adduser test
Adding user `test' ...
Adding new group `test' (1003) ...
Adding new user `test' (1003) with group `test' ...
Creating home directory `/home/test' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for test
Enter the new value, or press ENTER for the default
    Full Name []: Test User
    Room Number []: 
    Work Phone []: 
    Home Phone []: 
    Other []: 
Is the information correct? [Y/n] 
root@pinky:~# su test
Cannot execute /bin/bash: Permission denied
root@pinky:~# su test -c touch thefile # Does nothing
root@pinky:~# strace -u test /bin/ls
execve("/bin/ls", ["/bin/ls"], [/* 17 vars */]) = -1 EACCES (Permission denied)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb771b000
_llseek(3, 0, 0xbfbbe4f8, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Permission denied\n", 32strace: exec: Permission denied
) = 32
close(3)                                = 0
munmap(0xb771b000, 4096)                = 0
exit_group(1)                           = ?
root@pinky:~# ls -l /bin/ls
-rwxrwxrwx 1 root root 104528 2010-03-04 22:29 /bin/ls

You'll note that the permissions on /bin/ls are ridiculous. That's because I was trying to make sure there weren't any problems.

What's going on? Please, any suggestions are welcome! I don't know what to do!

share|improve this question
First of all, don't go changing permissions on stuff (e.g. ls) out of desperation. What are the permissions and ownership on /bin/bash, /etc/passwd, /home and /home/test? – Dennis Williamson Sep 11 '10 at 23:59
They're -rwxr-xr-x, owned by root. I've since changed permissions of ls back to the default, but adding extra permissions wouldn't hurt. – Charlie Sep 12 '10 at 0:05
All of them? If /home/test is owned by root that may be most of your problem. Try chown test:test /home/test. – Dennis Williamson Sep 12 '10 at 0:14
No, I meant the other things in /bin. Also, note the strace - it fails at opening the thing in /bin, not anything related to the home directory. The home directory of the test user is owned by test, as it should be. – Charlie Sep 12 '10 at 0:15
What are the permissions on /bin itself? Without the execute bit for world, nobody will be able to seek in that directory. – Dennis Williamson Sep 12 '10 at 0:18

Same answer as Dennis posted above in comments. On ubuntu 10.04 there are some updates that cause the permissions on /bin to become 660 - which causes this problem. Check that.

share|improve this answer
do you have a link for this info about the permissions on /bin? – natxo asenjo Sep 12 '10 at 20:15
This comes from personal experience, however a quick google search resulted this link which was the same thing I'm talking about: - It's also just worth taking a look at all of the root directories, there are updates and installs that sometimes cause permissions to change on these which cause issues like this. – Dave Holland Sep 12 '10 at 21:23
Dave that forum link just has further speculation. It would be useful to have some actual evidence that this was caused by an update of some kind. As a member of the ubuntu server team who triages server bugs every day, I'm surprised to hear of this for the first time. – SpamapS Dec 10 '10 at 19:55
SpamapS - it's been 6 months now so I don't remember all of the details. I run a Ubuntu server at home and this exact thing happened to me after a large batch of updates. Suddenly after restarting the system after the updates I could only log in as root, and after some digging I found that /bin was 660. I can't tell you much more than that. – Dave Holland Dec 10 '10 at 20:22
this answer has saved my ass. it turns out that on 10.10 there is also such problem – altern May 5 '11 at 10:56

Your Answer


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