This problem first appeared in 2.2.2 and continues in 2.2.5. I'm
posting this message to the newsgroup before submitting a bug
report.
Basically, login(1) calls chdir(home) before calling setuid(user).
When a home directory is NFS-mounted, and it is being exported
without root access permissions, any operation with that filesystem
made by root (such as chdir(), or the .hushlogin check) is seen by
the server as made by "nobody". The result is that chdir() fails,
and login says "No home directory - logging with home=/".
Workarounds:
- chmod o+x <home directory> (ugly)
- if you administer the server, re-export the home directory
granting root access to the FreeBSD box[es] (may be even uglier)
- edit /usr/src/usr.bin/login/login.c and move the chdir()
after the setuid(), or viceversa, and remake /usr/bin/login
(dangerous).
--JM
-----------------------------------------------------------------------
Universidad del Pais Vasco | http://www.we.lc.ehu.es/~jose
Dpto. de Electricidad y Electronica |
Facultad de Ciencias - Campus de Lejona | Tel.: +34-4-4647700 x2624
48940 Lejona (Vizcaya) - SPAIN | Fax: +34-4-4858139
-----------------------------------------------------------------------
"Go ahead... make my day." - H. Callahan