Operating System - HP-UX
1833414 Members
3093 Online
110052 Solutions
New Discussion

SSH equivalent to ABORT_LOGIN_ON_MISSING_HOMEDIR

 
YLTan
Frequent Advisor

SSH equivalent to ABORT_LOGIN_ON_MISSING_HOMEDIR


Does anyone know how/what the sshd_config equivalent to telnet (/etc/default/security) of
ABORT_LOGIN_ON_MISSING_HOMEDIR ?

Those setting in /etc/default/security have no effect on SSH.

I also found that SSH does not capture bad login in btmp file, it goes to syslog.log instead. Any way to set it to btmp? if it possible.
tyl
3 REPLIES 3
RAC_1
Honored Contributor

Re: SSH equivalent to ABORT_LOGIN_ON_MISSING_HOMEDIR

Seems that HP's ssh does not have that facility.

For loggin the closest option I could check was running ssh with -e option and defining the syslog.conf such that the errros goto seperate file. It would at least be easy to grep for failed ssh logins from this file rather than using syslog.log file.

Check openssh. It may have these options, not very sure abt it, never used it.
There is no substitute to HARDWORK
Steven Sim Kok Leong
Honored Contributor

Re: SSH equivalent to ABORT_LOGIN_ON_MISSING_HOMEDIR

Hi,

Since OpenSSH has tcpwrappers built-in, one way is to get tcpwrapper to run a script. I personally think however that the cleaner way of having logins aborted on missing home directories would be to rely on system login profiles without being dependent on feature availability in each application.

For instance, in /etc/profile, can have something like this within the signal traps:

if [ ! -e $HOME ]
then
exit
fi

Other system login scripts have to be modified accordingly to catch all.

Hope this helps. Regards.

Steven Sim Kok Leong
Chris Wong
Trusted Contributor

Re: SSH equivalent to ABORT_LOGIN_ON_MISSING_HOMEDIR

Here's another way to do it:
Write a little script that checks for which users don't have valid home directories (or you can run pwck). Take that list of users and add it to the sshd_config file:

DenyUsers user1 user2 user3

- Chris