We have everyone login to the *nix server as their own account and then use:
su – hci
that forces the *nix system to use the .profile of the hci user and not reference anything from the originating user.
Do they have to type in the hci password? What prevents them from logging in as hci directly?
Also the “-i” option on sudo clears out the environment from the original user.
In our setup (AIX 6.1), the users do need to enter the hci password when they su up to the hci username. We prevent them from logging in as hci directly by adding the following lines to /etc/ssh/sshd_config:
Match User hci
PasswordAuthentication no
That will not allow hci to login with a password, but still allow scripts which can handle key-file authentication (think sftp) to still work as an hci user. That has satisfied our security team…so far