- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Logging users' ivocations of /usr/bin/passwd
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 03:29 AM
02-19-2003 03:29 AM
Logging users' ivocations of /usr/bin/passwd
simple issue,
I need to keep a log of every invocation of the passwd command by users.
At first I thought this should be easy to accomplish through the syslogd.
But perusing the related manpages (e.g. abt. specially configuering sylogd.conf etc.) wasn't much of a revelation.
Does this mean I will have to write a small wrapper script (around passwd with an added logger(1) command or so) my self?
Albeit, I presumed that HP-UX already has a more conventional solution to this.
Rgds.
Ralph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 03:41 AM
02-19-2003 03:41 AM
Re: Logging users' ivocations of /usr/bin/passwd
/sbin/passwd
/usr/bin/passwd
/usr/old/bin/passwd
to root only or to a special user group configured in /etc/groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 03:47 AM
02-19-2003 03:47 AM
Re: Logging users' ivocations of /usr/bin/passwd
probably I haven't understood your suggested meassure.
The users shall still be able to change their passwords.
It's only that these incidents shall be logged.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 03:50 AM
02-19-2003 03:50 AM
Re: Logging users' ivocations of /usr/bin/passwd
I'm afraid, you need to write your wrapper script. No logging feature I'm aware of... at least for the simple /etc/passwd based passwd db.
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 04:14 AM
02-19-2003 04:14 AM
Re: Logging users' ivocations of /usr/bin/passwd
Once set on if someome runs the passwd binary and either succeeds in changing their password or fails you get these entries in the audit log (which you can display with audisp)
SELF-AUDITING TEXT: User= ops_sf Passwd successfully changed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 04:14 AM
02-19-2003 04:14 AM
Re: Logging users' ivocations of /usr/bin/passwd
your users' activity .Pros - good idea to see what's going on.Cons - complicated to use+needs trusted system.
Zeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 05:32 AM
02-19-2003 05:32 AM
Re: Logging users' ivocations of /usr/bin/passwd
I have to read about the auditing facility, and what it's implications were.
Meanwhile I have come up myself with this quick'n'dirty hack.
In syslog.conf I inserted the following:
$ grep local /etc/syslog.conf
local0.info /var/adm/syslog/passwd.log
Then I sent syslogd a SIGHUP
kill -1 $(cat /var/run/syslogd.pid)
and in the /etc/profile (so far the users have Bourne shells at login) I defined this silly function:
passwd() {
/usr/bin/logger -p local0.info -i $LOGNAME invoked passwd
if [ $# -eq 0 ]; then
/usr/bin/passwd
else
/usr/bin/passwd $1
fi
}
Provided the user sticks with his login shell this seems to work reasonably, and I get entries like this:
$ tail -1 /var/adm/syslog/passwd.log
Feb 19 14:08:12 somehost someone[29627]: someone invoked passwd
But I guess this solution has too many deficiencies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 11:20 AM
02-19-2003 11:20 AM
Re: Logging users' ivocations of /usr/bin/passwd
Meanwhile I am thinking myself if your passwd program should be changed to /usr/bin/passwd so that no user can directly run /usr/bin/passwd and avoid getting logged...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2003 05:31 AM
02-20-2003 05:31 AM
Re: Logging users' ivocations of /usr/bin/passwd
alias the passwd command to a script you create that loggs all the info and runs the passwd command.
script:
echo " `logname` date >> passwd.log"
passwd
#end
you could try something simple like this and it would only have pertinate info for you... no searching through syslog to find what you want.