Weird SSH problem... Any ideas?!?

Olaf Greve o.greve at
Fri Oct 21 06:41:56 PDT 2005

Hi again,

Erik Norgaard wrote:
> I think you can use mtree to get permissions right if they for some 
> reason have been changed.

This might be a good one to check... I'm not familiar with it yet, but 
does this check all permissions and ownerships and corrects 
errors/mismatches where possible?

> Another effect I would suspect you see - that is normal users see - is 
> that files' owner and group appears as numbers not the corresponding 
> names. One interesting thing here is whether both user and group are 
> numbers or only users.
> Try as normal user to 'ls -l /home' or something.

Now the plot thickens...
When doing this as the user abcdef which has UID 1026 I get the 
following results:
-Stuff owned by root -> root:wheel
-Stuff owned by abcdef -> 1026:www

When doing this as my normal user that is in the wheel group I get the 
same results, but when I do it as root I get the correct results:
-Stuff owned by root -> root:wheel
-Stuff owned by abcdef -> abcdef:www

When doing some more investigative work, I made the following observations:

Consider the following (properly modified for anonymity) parts of 
Ava:*:1001:1001:User &:/home/Ava:/bin/sh
abcdef:*:1026:1002:User &:/home/abcdef:/bin/sh

Idem for /etc/group:

Now, when logging in as user abcdef (either using SSH or 'login' from 
the shell as you suggested), for some users the above scenario happens, 
where e.g. the stuff owned by abcdef appears as: 1026:www

Then, when checking stuff owned by Ava, it shows up as being owned by 
Ava:wheel !!!

Also, when trying to perform on e.g. a file called a.bcd (owned by 
chown abcdef a.bcd -> error message: "Invalid argument"
chown 1026 a.bcd -> success
chown Avalanche a.bcd -> error message: "Operation not permitted"

Sounds like the problem only occurs for some users...

I'm completely puzzled now... Does anyone see anything dodgy in my 
/etc/passwd and/or /etc/group definitions???
Any solutions??

Also: over here the weekend is almost beginning and in some 1.5 hours 
from now I cannot read out this account until next Monday, so after I 
leave work today I'll be incomunicado, but as of next Monday I can reply 
to the messages again.


PS: David Kirchner mentioned the permissions on / and /etc should be 
755. I checked this and they both are correct. Permissions on 
/etc/passwd and /etc/group are root:wheel 644, and /etc/spwd.db 
/etc/master.passwd are root:wheel 600. All fine...

More information about the freebsd-questions mailing list