How can i know last 10 IP addresses of a user id in UNIX?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How can i know last 10 IP addresses of a user id in UNIX?
# 1  
Old 08-06-2013
How can i know last 10 IP addresses of a user id in UNIX?

Hi,

I am working on a project where i can commit the project filles using UNIX commands. Without my awareness some body has changed and commited the project files with my login credentials. Now I want to know the UNIX command to find out the last 10(or) more IP addresses that uses my project folders. In a brief UNIX CMND for knowing last 10 ip addresses that modified the files using a user account.

Thanks in advance.
# 2  
Old 08-06-2013
This is somewhat error prone. Just because somebody got to your account doesn't necessarily tell you how.

Try using the "last" command (as root)... this will go through the wtmp logs (which many things logged to when somebody "comes in"). And often times what is in that log db will also have the originating IP. Of course, there are a ton of variables... but who knows, it may show you what you are looking for.
# 3  
Old 08-09-2013
Try using
Code:
lastcomm

Code:
lastcomm userid

should give you the commands executed by a user
# 4  
Old 08-09-2013
Hello,

It's a kind advice. Please do not share your passwords to any one. It is a security voilation as well as you need to pay heavily for it. So please be careful in future for same. Even if you want to share with your team members about a common user password, please prefer a password protected sheet. Do not write or keep a note of passwords too.



Thanks,
R. Singh

---------- Post updated at 05:41 AM ---------- Previous update was at 05:23 AM ----------

Hello,

Could you please use the following command. May be it can help you.


Code:
last | awk '{print$3}' | more


Thanks,
R. Singh
# 5  
Old 08-13-2013
Code:
man last

tells about its options
Code:
last username
last -10 username

 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simplifying IPv6 addresses from user input

hi friends, im new to scripting and am tiring out to valid an ip address if user inputs 9 : 003 : 0 : 0 : 100 : 256 ,i need to suppress all leading zeros and single zero ie out put for the same should be 9 : 3 : : : 100 : 256 can any help using awk ,regular expression to split the string... (1 Reply)
Discussion started by: sandeepjeede
1 Replies

2. Programming

how to user get unix variable USER in C

in a C program, how do you access the unix environment variable USER for example? (1 Reply)
Discussion started by: omega666
1 Replies

3. IP Networking

Migrating existing Subnet to a new subnet and changing ip addresses in UNIX

Hi, My project needs to migrate the existing Subnet (255.255.255.0) to a new subnet and change the ipaddresses (currently C class). How can I do that. I need some information. John (0 Replies)
Discussion started by: johnmarsh
0 Replies

4. UNIX for Dummies Questions & Answers

Different ip addresses

Hello! I have logged in using Putty into another machine 'tele'. The ip address which i used to login to 'tele' is 192.168.1.3. Now while at 'tele' when i run "#ifconfig -a" i get the same ip address i.e, 192.168.1.3. But when i run "#arp tele" it gives the output: tele (10.143.128.8) ... (9 Replies)
Discussion started by: suhail.sadaqat
9 Replies

5. Shell Programming and Scripting

How to allow unix regular user to disable a unix printer

HI, I'm trying to create a script that a regular unix user can run from a unix menu and disable and enable a unix printer. Any help will be very helpful. Thanks (0 Replies)
Discussion started by: miguelpza
0 Replies

6. UNIX for Dummies Questions & Answers

unix-mail to external websites/addresses

Hi all, I would like to know if I can send unix mail to 'external email addresses'. My unix server is leo@ABCcompany.com. I am able to send emails to firstname.lastname@ABCcompany.com. But, we have some email addresses in our team on our parent company's server - ex:... (2 Replies)
Discussion started by: Joy_K
2 Replies

7. UNIX for Dummies Questions & Answers

searching for strings/user IP addresses

Hi, I'm trying to write a script, which will perform the following actions. Pick up the IP address of the PC I have used to telnet into the SUN server. Export this. Run the rest of my script. I am struggling with the first part, I know the IP address can be displayed by the command... (2 Replies)
Discussion started by: 30694
2 Replies

8. IP Networking

Adding a New IP Addresses to a SCO Unix Box

I tried the search and didn't come up with an answer to my question so I decided I'd post it.... How do you add a new IP address to a SCO Unix box? We're adding a router and I need to add the IP address to the UNIX box for the system to find it.. Thanks in Advance (1 Reply)
Discussion started by: dman110168
1 Replies
Login or Register to Ask a Question