Hp-Unix user login file collection


 
Thread Tools Search this Thread
Operating Systems HP-UX Hp-Unix user login file collection
# 1  
Old 05-09-2006
Hp-Unix user login file collection

Dear All,

how to check the unix log file which mean how many(who) user has been log in the server for the day, when they log in & when they log out?
# 2  
Old 05-10-2006
Bug

Hello,

The last command in HP-UX shows the successful log details of the users
and lastb command is used to bad login details.

Regards,
Santhi.
# 3  
Old 05-10-2006
Re:

use man last

you can use last | grep "May 10" for 10th may for successfull logins
and lastb | | grep "May 10" for unsuccessfull logins.

Cheers,

Awadhesh
# 4  
Old 05-11-2006
Hp-Unix user login file collection

Dear All,

Thks for your information!

Anyhow, how can i use this log file and send to my email everyday ontime.
for example every 6:00pm, i will receive this log file and write a report.

do yours have any idea?
# 5  
Old 05-11-2006
Try This Script

# Script Name: /dir/scr.sh
#! /usr/bin/ksh
DATE=`date "+DATE:%m.%d.%y"`
> /tmp/$DATE
echo "Details of Last Succesfull Logins are Below:" >>/tmp/$DATE
aw=`date | awk '{print $1,$2,$3}'`
last | grep "$aw" >> /tmp/$DATE
echo "Details of Last Failed Logins are Below:" >>/tmp/$DATE
lastb | grep "$aw" >> /tmp/$DATE
cat /tmp/$DATE | mailx -s "Todays Details" abc@def.gh
#Script End

Set this script to crontab
#crontab -e
0 18 * * * /dir/scr.sh

Cheers,

Awadhesh Pandey
# 6  
Old 05-14-2006
Thks Awa.

Anyway, how to capture the IP address instead of username?
for example as below:-

Details of Last Succesfull Logins are Below:
user1 pts/tc Sat May 13 12:00 still logged in
ora1 ftp Sat May 13 10:56 still logged in
user2 pts/td Sat May 13 10:28 - 10:53 (00:24)
user1 pts/tc Sat May 13 10:14 - 10:52 (00:38)
user1 pts/tc Sat May 13 10:10 - 10:14 (00:03)
ora1 pts/tc Sat May 13 09:52 - 10:03 (00:10)
ahle pts/tb Sat May 13 09:51 still logged in
ahle pts/ta Sat May 13 09:50 still logged in
ahle remshd Sat May 13 08:00 - 08:00 (00:00)

Can it show the usename and IP address as well in the log?
pls comment!

thks.
# 7  
Old 05-15-2006
Use the -R switch with the last command in HP-UX. On Sun, the switch is -a.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to enforce user to Enter text when login to a UNIX / Linux system?

Hi. I inject my tracklogin.sh script in the profile of each user. $ more .profile ./tracklogin.sh # This is the default standard profile provided to a user. MAIL=/usr/mail/${LOGNAME:?} bash-3.2$ more tracklogin.sh #!/bin/bash tdate=$(date +"%d%m%y") mkdir -p /tmp/root_log... (20 Replies)
Discussion started by: mohtashims
20 Replies

2. Shell Programming and Scripting

Login into another user from user inside script

now i have logged in username : ramesh in unix Now i have to created script file to login into another user and have run a command inside that user and after executing the command i have to exit from that user. Inside script, i have to login into su - ram along with password : haihow and have to... (4 Replies)
Discussion started by: rammm
4 Replies

3. AIX

User Account Login Login on your AIX server

I want to learn AIX. I would like to find someone who would be willing to give me a login to their AIX home lab server. My intent is to poke around and discover the similarities and differences of AIX compared to other *NIXs. I am a UNIX admin so I can think of what some immediate concerns may... (1 Reply)
Discussion started by: perl_in_my_shel
1 Replies

4. Shell Programming and Scripting

How to Login as another user through Shell script from current user[Not Root]

Hi Every body, I would need a shell script program to login as different user and perform some copy commands in the script. example: Supppose ora_toms is the active user ora_toms should be able to run a script where user: ftptomsp pass: XXX should login through and run the commands ... (9 Replies)
Discussion started by: ujjwal27
9 Replies

5. UNIX for Dummies Questions & Answers

Unix user login class

Hello - Could anyone please explain what is login class in unix..? is it supported by Linux, AIX, HP-UX, Solaris? Also how do we update this when a user is created? I looked into man pages for useradd/usermod and mkuser, but could not find any option to add/update login class for a user. ... (5 Replies)
Discussion started by: manju--
5 Replies

6. UNIX for Advanced & Expert Users

Unix user with root power problem in to login in putty

Hello, I created a user in my AIX 5.3 system and i modified /etc/passwd file in and assigned this user the uid=0 like root user. The problem is that when this user log into the system through putty it asks for root password instead of the user password. As a result of this, if i reset the... (4 Replies)
Discussion started by: omonoiatis9
4 Replies

7. Solaris

error message rmclomv ... SC Login Failure for user Please login:

Hello World ~ HW : SUN Fire V240 OS : Solaris 8 Error message prompts 'rmclomv ... SC login failure ...' on terminal. and Error Message prompts continually 'SC Login Failure for user Please login:' on Single Mode(init S) The System is in normal operation, though In case of rain, Can... (1 Reply)
Discussion started by: lifegeek
1 Replies

8. UNIX for Dummies Questions & Answers

Collection of Unix Links

Hi, Is there is a good collection of Links to Unix Related stuff? Regards, Kriss (1 Reply)
Discussion started by: Kriss
1 Replies

9. SCO

Help adding user login in Unix Sco

We have made numerous requests to our system administrator to add new employees at login screen ( passwords not required ) to no avail. I can login into root but not sure how to proceed from there. We have a 10 yr. old version of SCO Can anyone help? I know very few unix commands okay... (1 Reply)
Discussion started by: houseostyle
1 Replies

10. UNIX for Dummies Questions & Answers

Error login user file utmp

could probably help me with a unix problem. Basicallyu, when the users try to connect to the server they get this messge: No UTMP entry. you must exec "LOGIN" from the lowest level "sh" They are connecting using a windows emulator called TINYTERM. We cannot connect from the console either... (3 Replies)
Discussion started by: jernesto_diaz
3 Replies
Login or Register to Ask a Question