Operating System - HP-UX
1826408 Members
4161 Online
109692 Solutions
New Discussion

Re: Prevent "su" to user without HOMEDIR

 
tom quach_1
Super Advisor

Prevent "su" to user without HOMEDIR

Hi All,

hpux 11.11 and 11.23
this parameter works fine when connecting using telnet or ssh
/etc/default/security
ABORT_LOGIN_ON_MISSING_HOMEDIR=1

but it does not work when su to this user from different user.
Please advice on how to prevent group member from "su" to this user when the HOMEDIR was mising?

Thanks in advance.
Tom


2 REPLIES 2
Peter Nikitka
Honored Contributor

Re: Prevent "su" to user without HOMEDIR

Hi,

the su command is not designed to check this.
For the non-root user after a lock of the account, a 'su' won't be successful anymore.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Dino_4
Frequent Advisor

Re: Prevent "su" to user without HOMEDIR


Hi,

how about this in /etc/profile

if [ `/usr/bin/id -g` -gt 100 ]
then
if [ ! -d "$HOME" ]
then
echo "Access denied "
exit
fi
fi

The GID-Value should be checked though.