Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How can I find a user profile Post 302185723 by jim mcnamara on Tuesday 15th of April 2008 04:46:23 PM
Old 04-15-2008
The last command shows logins
Code:
last -100 username

example:
Code:
last jmcnama
jmcnama  pts/4        Tue Apr 15 09:51   still logged in
jmcnama  pts/1        Mon Apr 14 09:02 - 16:33  (07:30)
jmcnama  ftp          Fri Apr 11 12:31 - 12:33  (00:02)
jmcnama  pts/2        Thu Apr 10 08:53 - 16:25 (1+07:31)
jmcnama  pts/2        Wed Apr  9 09:14 - 16:29  (07:14)
jmcnama  pts/2        Tue Apr  8 16:44 - 16:58  (00:14)
jmcnama  ftp          Tue Apr  8 16:34 - 16:35  (00:01)
jmcnama  pts/2        Tue Apr  8 09:05 - 16:37  (07:31)
jmcnama  pts/3        Mon Apr  7 08:55 - 19:12  (10:17)
jmcnama  pts/1        Fri Apr  4 08:57 - 18:46  (09:48)
jmcnama  pts/21       Thu Apr  3 10:57 - 08:56  (21:59)
jmcnama  pts/21       Thu Apr  3 10:21 - 10:57  (00:36)
jmcnama  pts/23       Wed Apr  2 12:48 - 13:38  (00:50)
jmcnama  pts/1        Tue Apr  1 14:09 - 20:06 (1+05:56)
jmcnama  pts/4        Mon Mar 31 09:10 - 20:20  (11:09)
jmcnama  pts/7        Fri Mar 21 09:38 - 16:17  (06:39)
jmcnama  pts/17       Thu Mar 20 11:33 - 20:22  (08:48)
jmcnama  pts/13       Thu Mar 20 11:12 - 11:12  (00:00)
jmcnama  pts/13       Thu Mar 20 11:11 - 11:11  (00:00)
jmcnama  ftp          Tue Mar 18 15:37 - 15:40  (00:02)
........... goes on and on

login count by day and number of logins
Code:
> last jmcnama |\
awk '{arr[$3 $4 $5]++}
     END { for(i in arr) {cnt++}
     print "logins", NR, "days ", cnt }'
logins 254 days  144
>

change the username to whatever you want.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

User profile

Sorry to I am not familiar with script writing , attach is the /etc/profile in my system , we have limit each user can only have one login in the system . When the user login , if the system found the user have a dead process in the system , the system will confirm the user to kill the previous... (1 Reply)
Discussion started by: ust
1 Replies

2. Shell Programming and Scripting

accerssing user profile?

Hello there, I would like to know how can i prevent a normal user (not root user) from accessing his .profile and editing its information? Also, how can i prevent this user from deleting a certain file named "script"? Any help in that? Thanks in advance, (3 Replies)
Discussion started by: charbel
3 Replies

3. UNIX for Dummies Questions & Answers

User Profile

Hi Guys, Im really new with this stuff...could anybody help to guide me ...how do i change/edit user profiile ? (2 Replies)
Discussion started by: gagasan_makmur
2 Replies

4. UNIX for Dummies Questions & Answers

refresh user profile

Scenario: a non-root user is under primary group "devel" and I change their primary group to "nondevel"; I then want to be able to give the user a command which refreshes their user profile so that any new files created under their session are assigned to the new group. What is the command for... (1 Reply)
Discussion started by: dhinge
1 Replies

5. IP Networking

how can i find a user profile

Hi I want to know how can i find a user when he has logged in, at what time and how many days, anyone can help me (1 Reply)
Discussion started by: darwinscp@hotma
1 Replies

6. AIX

Which file has the user profile?

It's been a long time since I've done this and I can't remember which file is needed to edit. I would like to change the prompt for a user on my AIX 5.3 box, but I don't see a .profile file or a rc.ksh file to edit. Which file do I need to edit to get this? (1 Reply)
Discussion started by: bbbngowc
1 Replies

7. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

8. Shell Programming and Scripting

User profile, environment

Hello , i am on sles 11, and i can't figure out how can i locate my profile file, the one that is use for setting the environment when i log in. oracle@r200:~> cd oracle@r200:~> pwd /opt/oracle oracle@r200:~> echo $SHELL /bin/bash oracle@r200:~> oracle@r200:~> cat .profile cat: .profile:... (4 Replies)
Discussion started by: tonijel
4 Replies

9. UNIX for Dummies Questions & Answers

Copying the .profile of one user to another.

I want to copy .Profile file from user1 homedirectoryto user2 homedirectory in Aix. Please help me with the process. (4 Replies)
Discussion started by: Laxxi
4 Replies
AA-GENPROF(8)                                                        AppArmor                                                        AA-GENPROF(8)

NAME
aa-genprof - profile generation utility for AppArmor SYNOPSIS
aa-genprof <executable> [-d /path/to/profiles] OPTIONS
-d --dir /path/to/profiles Specifies where to look for the AppArmor security profile set. Defaults to /etc/apparmor.d. DESCRIPTION
When running aa-genprof, you must specify a program to profile. If the specified program is not a fully-qualified path, aa-genprof will search $PATH in order to find the program. If a profile does not exist for the program, aa-genprof will create one using aa-autodep(1). Genprof will then: - set the profile to complain mode - write a mark to the system log - instruct the user to start the application to be profiled in another window and exercise its functionality It then presents the user with two options, (S)can system log for entries to add to profile and (F)inish. If the user selects (S)can or hits return, aa-genprof will parse the complain mode logs and iterate through generated violations using aa-logprof(1). After the user finishes selecting profile entries based on violations that were detected during the program execution, aa-genprof will reload the updated profiles in complain mode and again prompt the user for (S)can and (D)one. This cycle can then be repeated as necessary until all application functionality has been exercised without generating access violations. When the user eventually hits (F)inish, aa-genprof will set the main profile, and any other profiles that were generated, into enforce mode and exit. BUGS
If you find any bugs, please report them at <http://https://bugs.launchpad.net/apparmor/+filebug>. SEE ALSO
apparmor(7), apparmor.d(5), aa-enforce(1), aa-complain(1), aa-disable(1), aa_change_hat(2), aa-logprof(1), logprof.conf(5), and <http://wiki.apparmor.net>. AppArmor 2.7.103 2012-06-28 AA-GENPROF(8)
All times are GMT -4. The time now is 07:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy