Link to home
Start Free TrialLog in
Avatar of Terry Rogers
Terry RogersFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Suppressing Last Login on HP UX for SUDO command and Specific User

I am attempting to suppress Last Login information being displayed for a specific user when sudo'ing a command.

I have set the attribut "DISPLAY_LAST_LOGIN" to equal 0 for that user in the userdb, however it is still showing the Last Login information.

Our OS is HP UX, realease B.11.31.

root myserver as livehost:/usr/users/myuser/scripts/test $ userdbget -u myuser
myuser DISPLAY_LAST_LOGIN=0

Open in new window


What am I missing?
Avatar of noci
noci

Most probably you need to preserve the environment variable, most environment variables are stripped from the environment by sudo.
you need to check the sudoers file on this setting (or just set the variable there...).
ASKER CERTIFIED SOLUTION
Avatar of Terry Rogers
Terry Rogers
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have no HP-UX to test with so sorry.  You can close by accepting your own answer as solution if you like.
Avatar of Terry Rogers

ASKER

Identified solution myself