permission problems w/ ordinary user ....

William A. Mahaffey III wam at
Sun Aug 3 12:55:11 UTC 2014

On 08/02/14 19:01, Polytropon wrote:
> On Sat, 02 Aug 2014 18:56:29 -0500, William A. Mahaffey III wrote:
>> On 08/02/14 18:40, Polytropon wrote:
>>> On Sat, 02 Aug 2014 18:28:47 -0500, William A. Mahaffey III wrote:
>>>> .... I have been trying to setup the regular user (me, non-root) on my
>>>> newly minted FreeBSD 9.3 box. I tried su-ing from tooy & ssh-ing in as
>>>> me from another box, both give weird results, see the following from my
>>>> syslog:
>>>> [...]
>>>> Aug  2 18:23:01 kabini1 sshd[1252]: _secure_path: cannot stat
>>>> /home/wam/.login_conf: Permission denied
>>>> also, the home-directory keeps getting the 'x' permission bit set to off
>>>> by .... something ....
>>> I think you have described the reason for the problem:
>>> The x attribute for a directory means "enter and search"
>>> and should be _set_ for the user. If it's not, the user
>>> cannot enter his own home directory or access files
>>> within it. In this case, /home/wam/.login_conf cannot
>>> be read which seems to be neccessary for the login
>>> process.
>>> You need to find that "something" that created or altered
>>> /home/wam with the x attribute off. Login as root and
>>> correct the setting manually, so you should be able to
>>> login afterwards.
>>> This is how the resulting "ls -l /home" output it should
>>> look like for your user:
>>> 	drwx------  [...] wam     wam     [...] wam/
>>> 	   ^
>>> (This is minimum permissions; drwxrwxr-x or drwxr-x---
>>> are other common examples.)
>>> How did you introduce the user to the system? Did you
>>> use "adduser" or "pw add"?
>> I used useradd as root, & the permissions were set correctly to begin
>> with.
> Okay, so a "problem upon initiation" does not occur.
>> I suspect that the failed logins are triggering the reset, but w/
>> little proof ....
> This is _very_ strange. Do you have anything in your login
> scripts, like ~/.cshrc (or ~/.tcshrc), ~/.login or ~/.profile
> that looks "offending"?

Nothing I can see .... I am setting aliases & the like, but nothing 
fancy ////

>> I have reset the perms as root several times during
>> this exercise, & they keep getting unset after the login failure ....
> I'm not sure what part of the system could trigger that behavuiour,
> it just sounds totally wrong...
> However, you could run truss on an login attempt to see what
> the process does (invisibly), calling /bin/chmod via execve()
> or by chmod() or popen().

I eventually noticed that the default ~/.login_conf had an entry, 
commented out. I uncommented it, reset the perms, logged in & out 
several times, & everything went AOK.

Noob observation: that entry should be uncommented from the factory :-) ....


	William A. Mahaffey III


	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.

More information about the freebsd-questions mailing list