- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to get syslogging of logins?
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
09-21-2004 11:52 PM
09-21-2004 11:52 PM
I found that in HP-UX 11.00 among the system utilities, using login only 'ftpd' and 'su' logs something
(user, host, etc) into syslog. rlogin, telnet
don't log anything. Is there any way to get
at least user name into syslog from telnet?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:01 AM
09-22-2004 12:01 AM
Re: How to get syslogging of logins?
Pete
Pete
- Tags:
- wtmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:01 AM
09-22-2004 12:01 AM
Re: How to get syslogging of logins?
There are a few logs... /var/adm/sulog wtmp,/etc/utmp etc...
for extra configuration of syslog do a ma syslogd
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:10 AM
09-22-2004 12:10 AM
Re: How to get syslogging of logins?
I gather syslog data reading /dev/log.
/etc/wtmp is populated another way then
syslogd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:16 AM
09-22-2004 12:16 AM
Re: How to get syslogging of logins?
OK, you want this data in syslog as well. I think the entry "auth.info /var/adm/syslog/syslog.log" in /etc/syslog.conf would do what you wish. The issue "kill -HUP `cat /var/run/syslog.pid`".
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:24 AM
09-22-2004 12:24 AM
Re: How to get syslogging of logins?
Thanks anyway!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:31 AM
09-22-2004 12:31 AM
Re: How to get syslogging of logins?
Try to audit utmp file with last command and redirect into /var/adm/syslog/logininfo.log file like that with a simple script and do it simulation with cron job,s there.
Else there is another way using profile file as,
on /etc/profile make a script line as,
if [[ $(ps -ef | grep -q "telnet") || $(ps -ef | grep -q "rlogin") ]]
then
echo "$LOGNAME is using telnet at $(date)" >> /var/adm/syslog/logininfo.log
fi
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:32 AM
09-22-2004 12:32 AM
Re: How to get syslogging of logins?
if [[ $(ps | grep -q "telnet") || $(ps | grep -q "rlogin") ]]
then
echo "$LOGNAME is using telnet at $(date)" >> /var/adm/syslog/logininfo.log
# You can add some more messages here
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 12:56 AM
09-22-2004 12:56 AM
Re: How to get syslogging of logins?
But they run under root.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 01:09 AM
09-22-2004 01:09 AM
Re: How to get syslogging of logins?
Every login ( except cde login ) will use /etc/profile to set login informations there. We can use that login profile file to log login service informations there.
We can get the process information's of that current user with execution of ps (without any option there).
Check it by putting the following on your /etc/profile file as,
---- /etc/profile -----
# Login service logging
if [[ $(ps | grep -q "telnet") -eq 0 ]]
then
echo "$LOGNAME logs with service telnet at $(date) .. some more informations there" >> /var/adm/syslog/logininfo.log
elif [[ $( ps | grep -q "rlogin") -eq 0 ]]
then
echo "$LOGNAME logs with service rlogind at $(date) .. some more informations there" >> /var/adm/syslog/logininfo.log
fi
Check with normal user, root by login with telnet and rlogin service now. /var/adm/syslog/logininfo.log contain's entry for that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 01:16 AM
09-22-2004 01:16 AM
Solution# cat /tmp/logininfo.log
muthu logs with service telnet at Wed Sep 22 00:58:18 MDT 2004 .. some more informations there
root logs with service telnet at Wed Sep 22 00:58:47 MDT 2004 .. some more informations there
# Note: We can add more user informations with PID of shell etc there on /etc/profile file too as like last output
But one correction on using loginginfo.log that,
/var/adm/syslog directory can not be writtable for everyone. :-) So change the permission ( Don't ) else try to save the logininfo.log file at /etc/ or /tmp location or every one can write there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 01:20 AM
09-22-2004 01:20 AM
Re: How to get syslogging of logins?
Start inetd daemon with -l option.
This enables the connection logging.
When this is enabled internet daemon logs attempted connetions to services. It also logs connections which fail the security check. This is useful when someone is repeatedly trying to access your system from some system.
Successful loging at info log level to syslog.
Security check failures at notive log level.
Hope this helps.
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 01:39 AM
09-22-2004 01:39 AM
Re: How to get syslogging of logins?
Sep 22 01:16:07 hostname inetd[21045]: telnet/tcp: Connection from unknown (remote-machine) at Wed Sep 22 01:16:07 2004
like this. It is not enough to log user / root there.
It is not logging about step-up service on the same machine too. They are as,
telnet test --> rlogin localhost -l root
rlogin test --> telnet root localhost
etc... there
inetd -l will all service usage on /etc/inetd.conf file. IT will put every service usage there on syslog.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 02:04 AM
09-22-2004 02:04 AM
Re: How to get syslogging of logins?
Your solution is almost excellent!
I am so sorry thet user info is missed!
Anyway thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 02:14 AM
09-22-2004 02:14 AM
Re: How to get syslogging of logins?
You solution is good also!
thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 02:19 AM
09-22-2004 02:19 AM
Re: How to get syslogging of logins?
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 02:23 AM
09-22-2004 02:23 AM
Re: How to get syslogging of logins?
Solaris 8,9?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2004 03:02 PM
09-22-2004 03:02 PM
Re: How to get syslogging of logins?
Check out this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=697894
Regards,
Seth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2005 04:38 PM
08-11-2005 04:38 PM
Re: How to get syslogging of logins?
tty -s
ret=$?
if [ $ret -eq 0 ] ; then
tty="`tty | sed s:/dev/::g`"
conn_type=`ps -ef | grep $tty | grep -e sshd -e telnetd -e rlogind | grep -v grep | awk '{ print $8 " " $9 " " $10}' | sed s/://g`
echo "`date` : `whoami` : $conn_type : `hostname` : $tty" >> /tmp/logins_type.log ; chmod 666 /tmp/logins_type.log > /dev/null 2>&1
fi
Obviously, using logger here would be better than a log file in /tmp, but you can change that bit.
- Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2005 04:40 PM
08-11-2005 04:40 PM
Re: How to get syslogging of logins?
the only problem with any /etc/profile solution is that anyone can remote execute a command, but /etc/profile won't be read in that instance.
eg:
ssh server2 "echo I am not running /etc/profile!"
and the /etc/profile file will not be executed :-(
Ta
- Andy