Problem with limiting logins to one in AIX 5.3


 
Thread Tools Search this Thread
Special Forums Cybersecurity Problem with limiting logins to one in AIX 5.3
# 1  
Old 04-06-2007
Question Problem with limiting logins to one in AIX 5.3

I am migrating from 5.2 to 5.3 AIX. In previous versions of AIX, including 5.2, I've been able to limit user's logins to 1 by using the following script named Block_user:

#!/bin/ksh
USER=$1
NUM=`who | grep $USER | cut -c1-8 | wc -l`
#The above ' is not a single quote but back quote
if [[ $NUM -lt 1 ]]
then
exit 0
fi
echo "permission denied...$NUM is the limit of logins"
exit 1

and changing the following

/usr/lib/security/methods.cfg - add:
auth_method
program = /usr/bin/Block_user

and

/etc/security/user, changing the default stanza to read
auth1 = SYSTEM,auth_method

This doesn't work in 5.3. The user tries to login and receives "Invaild user or password". Removing the auth_method from /etc/security/user allows the person to login. I've spoken with IBM and so far no one has an answer as to why it will not work. I'm hoping someone out here does? Smilie
# 2  
Old 05-01-2007
Try using 'fuser' to see if the users .profile is in use by more than one process when they log on.
# 3  
Old 05-01-2007
thank you for the reply but fuser will not help. What I was trying to do was limit the number of logins per user. Since my posting I found that IBM went back to the old way of doing this and that is setting the limit in login.cfg. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Limiting the Script

Greetings. I have script to monitor the disk space of folder it runs every 17 min with help of cron. It sends email when disk size reaches to 85 %. Now the issue is that it continousely generates email until we clear some space in that folder. Is it possible to restrict the Script to send only... (14 Replies)
Discussion started by: manju98458
14 Replies

2. UNIX for Advanced & Expert Users

Limiting access to postqueue

Hi, I have a Debian 6 machine running Postfix 2.7.1. The email server works pretty well. I discovered that any non-root user can access to the mail queue using postqueue command just like root. How can I limit this access? (1 Reply)
Discussion started by: mjdousti
1 Replies

3. Solaris

Limiting Connections from a single IP

I'm looking for a way to limit connections to a Solaris 10 box from any single IP. The problem is that I've had more experience doing this with IPTables on Linux, rather than with IPFilter, which I've found to be somewhat feature-poor. I hope there is some way to do this using IPFilter, I've... (2 Replies)
Discussion started by: spynappels
2 Replies

4. AIX

AIX ftp/sftp script monitor to failed logins

Hi All, Any idea on how to write a script on AIX 5.3 to monitor ftp or sftp login failed. Thanks and more power, Itik (2 Replies)
Discussion started by: itik
2 Replies

5. HP-UX

Limiting SFTP Users While Not Limiting Regular Users?

Hi, I have searched the web and have come back with nothing that is satisfactory for what I require. SFTP is my corporations new file transfer standard. What I require is a method to lock down SFTP users to their directory (they may go to sub directories) while not restricting regular users. ... (2 Replies)
Discussion started by: Emancipator
2 Replies

6. HP-UX

limiting failed logins to three

I have tried limiting failed logins to three by the following method logins -ox \ | awk -F: '($8 != "LK" && $1 != "root") { print $1 }' \ | while read logname; do /usr/lbin/modprpw -m umaxlntr=3 "$logname" done /usr/lbin/modprdef -m umaxlntr=3 but it is failing on the 4th... any ideas?... (1 Reply)
Discussion started by: csaunders
1 Replies

7. UNIX for Dummies Questions & Answers

Problem with 'ghosted' logins.

I'm using a FreeBSD 5 x86 system. I have no users aside from root and my normal login, ie. the computer is not used by anyone other than myself. I find that I get two ghosted logins after running KDE. These logins have no processes attached to them and `who` reports that they came from my... (1 Reply)
Discussion started by: seg
1 Replies

8. UNIX for Dummies Questions & Answers

question about limiting the display from the ls command

hey guys im rly new to unix. im attempting to list the 5 largest files in a directory. so i got this far... ls -lR | sort -r and this lists all files by filesize, how can i limit this to only the 5 largest? (4 Replies)
Discussion started by: Aesop
4 Replies

9. UNIX for Dummies Questions & Answers

Limiting access

Hi, I'm new to linux and unix, and i have couple of problems: 1) how can i limit the access for a user, for example, i created a user, and i want that this user will be able to be only in one directory, and will see only the files i want him to. 2) I have a domain name, and i want that every... (4 Replies)
Discussion started by: misha
4 Replies
Login or Register to Ask a Question