Visit Our UNIX and Linux User Community

Limit logins to 1

Thread Tools Search this Thread
Operating Systems AIX Limit logins to 1
# 1  
Old 08-11-2006
Limit logins to 1 (RESOLVED)

Trying to limit 1 login per account...


We have 2 auth logins, one to the AIX (telnet)then into a distribution mgmt software, the users do not have a shell to log into on the AIX itself, so placing a script such as:

active=`who | awk '{printf",%s,\n",$1}' | grep ,$LOGNAME, | wc -l`

into the .profile wont work, as there is no home directory and no shell execution...

How else can I accomplish this so that the users are limted to 1 login per account...

Added script into /etc/profile rather than homedir profilkes and it worked...

Thanks all...

Last edited by pheusion; 08-11-2006 at 01:09 PM..

Previous Thread | Next Thread
Test Your Knowledge in Computers #328
Difficulty: Easy
The Windows ME operating system was released in the year 2006.
True or False?

9 More Discussions You Might Find Interesting

1. Red Hat

Limit root user of SSH logins

Hi team, I tried to modify the /etc/security/limits.conf file to limit the root user for more one login. I added the line in limits.conf file like: @root hard maxlogins 1 I also tried to modify /etc/ssh/sshd_config to limit the root userlogin by adding this: ... (10 Replies)
Discussion started by: leo_ultra_leo
10 Replies

2. Solaris

Limit: stacksize: Can't remove limit

Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine? Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies

3. Solaris

Increase concurrent logins?

Hi all, I've been tasked to create a robot account across a bunch of SunOS servers, amongst the requirements for this account is this condition: Concurrent access requirement The robot account shall have the ability to create at least ten(10) concurrent access sessions. In order to... (0 Replies)
Discussion started by: dan-e
0 Replies

4. Solaris

Display logins via SSH

For work, I need a box to show all logins made recently upon a successful login. Sort of a banner showing previous logins. Not sure how to go about this. (2 Replies)
Discussion started by: LittleLebowski
2 Replies

5. Solaris

User Logins

Is the below logins are needed in the machine..... nuucp , uucp ,smmsp , svctag , listen , webservd , ip ( We are not using printers), Can you help in these? Regards, kumar (3 Replies)
Discussion started by: rajeshkumarvg
3 Replies

6. Shell Programming and Scripting

Last two logins script

This is the contents of my file: 12/07/2009 12:07:58 12/07/2009 12:17:36 12/07/2009 12:22:29 12/07/2009 12:26:39 12/07/2009 12:28:01 mickey.mouse 12/07/2009 12:48:49 mickey.mouse 12/07/2009 12:49:33 mickey.mouse 12/07/2009... (3 Replies)
Discussion started by: diallo0024
3 Replies

7. Shell Programming and Scripting


I want a script that checks the logins and logouts in a system.Is there a way to keep the logins and logouts in files and then compare them every e.g. 10 seconds? for tcsh. (1 Reply)
Discussion started by: aekaramg20
1 Replies

8. UNIX for Dummies Questions & Answers

NVT logins

Hello again! Another thing came up the other day. I've noticed that a few of my "beloved" users who by the way, use NVT (Novell Virtual Terminal) to log in the server, when told to log off, press the power button to shut down their computer, instead of logging off as they should. As a result... (2 Replies)
Discussion started by: pappous
2 Replies

9. UNIX for Dummies Questions & Answers

Help with logins

Could someone please tell me what I would have to do so I can dial in to Solaris through a modem and login? Thanks in advance. Jomar (2 Replies)
Discussion started by: crispyco
2 Replies
logins(1M)						  System Administration Commands						logins(1M)

logins - list user and system login information SYNOPSIS
/usr/bin/logins [-admopstux] [-g group...] [-l login_name...] DESCRIPTION
This command displays information on user and system logins known to the system. Contents of the output is controlled by the command options and can include the following: user or system login, user id number, passwd account field value (user name or other information), primary group name, primary group id, multiple group names, multiple group ids, home directory, login shell, and four password aging param- eters. The default information is the following: login id, user id, primary group name, primary group id and the account field value. Out- put is sorted by user id, system logins, followed by user logins. OPTIONS
Options may be used together. If so, any login that matches any criteria are displayed. The following options are supported: -a Add two password expiration fields to the display. The fields show how many days a password can remain unused before it automatically becomes inactive, and the date that the password expires. -d Selects logins with duplicate uids. -g group Selects all users belonging to group, sorted by login. Multiple groups can be specified as a comma-separated list. When the -l and -g options are combined, a user is only listed once, even if the user belongs to more than one of the selected groups. -l login_name...Selects the requested login. Multiple logins can be specified as a comma-separated list. Depending on the nameservice lookup types set in /etc/nsswitch.conf, the information can come from the /etc/passwd and /etc/shadow files and other nameservices. When the -l and -g options are combined, a user is only listed once, even if the user belongs to more than one of the selected groups. -m Displays multiple group membership information. -o Formats output into one line of colon-separated fields. -p Selects logins with no passwords. -s Selects all system logins. -t Sorts output by login instead of by uid. -u Selects all user logins. -x Prints an extended set of information about each selected user. The extended information includes home directory, login shell and password aging information, each displayed on a separate line. The password information consists of password status (PS for password, NP for no password or LK for locked). If the login is passworded, status is followed by the date the password was last changed, the number of days required between changes, and the number of days allowed before a change is required. The password aging information shows the time interval that the user receives a password expiration warning message (when logging on) before the password expires. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.10 5 Jul 1990 logins(1M)

Featured Tech Videos