Rstrict login based on ip address


 
Thread Tools Search this Thread
Operating Systems AIX Rstrict login based on ip address
# 1  
Old 01-18-2012
Rstrict login based on ip address

Hi All,

I want to check the system ip from which someone is trying to login using a specific user id, suppose "admin". If the ip is not like 182.10.191.* than the user shouldn't be able to login using the admin id. This is just to restrict the admin login from within a range of ip only.

Can you help using the .login file please. The default shell is /usr/bin/csh here.

Regards
Sraj
# 2  
Old 01-18-2012
Hi,
you can use the command who with -u option it will list all the user who were logged in


bash-3.2$ who -Hu
NAME LINE TIME IDLE PID COMMENT
gupendra pts/5 2012-01-18 09:03 00:51 10446 (182.10.191.2)
swatib pts/7 2012-01-18 09:24 00:52 11531 (182.10.191.3)

thanks,
venkat
# 3  
Old 01-18-2012
Rstrict login based on ip address

Hi Venkat,

Thanks for your reply. Actually I know this command but little weak in scripting. Please see if you can provide me a script which can be called from .login file.

Regards
# 4  
Old 01-18-2012
Hi,
you can extract the IP address like this


bash-3.2$ who -Hu|grep admin|awk '{print $7}'
(10.72.186.23:1.0)
(10.72.186.24:1.0)
(10.72.186.23:1.1)
(10.72.186.23:1.2)


thanks,
venkat
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

2. Shell Programming and Scripting

Issue with form-based login

Hello, I'm trying to build a script which logins to an application and logout, where the user would input URL, credentials, no. of users, iterations etc. The objective is to test max no. of sessions our reverse proxy apache can handle. I'm trying to handle the application login and logout... (1 Reply)
Discussion started by: pdilipm
1 Replies

3. Shell Programming and Scripting

UNIX Script to query Active Directory: give cn (NT login name) and receive mail (Email address)

Hi folks I need to write UNIX script (with ldapsearch) to query Active Directory. Input is NT login name and output is Email address. Attached a screenshot of Sysinternals "AD Explorer". I need to do the same in CLI. http://i.imgur.com/4s6FB.png I am absolute LDAP/ldapsearch noob. (0 Replies)
Discussion started by: slashdotweenie
0 Replies

4. IP Networking

Selecting interface based on source and destination ip address

Hi all, I have some doubts in selecting the interface to transfer packets and receive the packets. --> Multiple interfaces : -------------------- 1) 0.0.0.0 --------> wild card address. 2) x.x.x.x --------> valid address.(192.168.1.156) 3) ff.ff.ff.ff -------->... (0 Replies)
Discussion started by: vijaypdp2006
0 Replies

5. IP Networking

Selecting Interface based on Destination IP address

Hi all, How an interface is selected based on the destination ip address. Thanks in advance........ (5 Replies)
Discussion started by: vijaypdp2006
5 Replies

6. UNIX for Dummies Questions & Answers

Panic kernal-mode address fault on user address 0x14

:) Firstly Hi all!!, im NEW!! and on here hoping that someone might be able to offer me some help... i have a server that keeps crashing every few days with the error message: PANIC KERNAL-MODE ADDRESS FAULT ON USER ADDRESS 0X14 KERNAL PAGE FAULT FROM (CS:EIP)=(100:EF71B5BD) EAX=EF822000... (10 Replies)
Discussion started by: Twix
10 Replies

7. Shell Programming and Scripting

how to detect ip address based location using PHP

I am interested in finding out if there is a reliable and economical way for extracting user's location based on his ip address, using php I tried to get the job done using ip2location.com, but I am not happy how it deals with result inconsistently. (2 Replies)
Discussion started by: siftin-com
2 Replies

8. UNIX for Advanced & Expert Users

dos based ssh/telnet login program

I want to find a program that can run in DOS, login to a ssh/telnet server, then run a specifed command to do a daily jobs, can anyone tell me is there any application i can find in the internet? (2 Replies)
Discussion started by: zp523444
2 Replies

9. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies
Login or Register to Ask a Question