Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Disable multiple ssh logins for an OS user in Solaris Post 303036038 by engrcha on Thursday 13th of June 2019 06:16:24 AM
Old 06-13-2019
Disable multiple ssh logins for an OS user in Solaris

Hi folks,
I am fairly a beginner when it comes to Solaris OS administration, but part of my job somehow has scope to provide L1-level of OS administration over a few solaris servers.

Now, we have a requirement to limit the number of simultaneous ssh logins/sessions to the server, sort of similar to a windows server where an OS windows account can only be used one at a time, so if another colleague logged in to that same windows server, my current RDP session will be cut off.

Is there any way to do the same for a solaris server? My servers are on SunOS 5.11 11.3 sun4v sparc.

I've done some googling and I see the files "/etc/limits" and "/etc/security/limits.conf" being mentioned but I don't have those in my server.

Any input from the community will be very much appreciated.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multiple auto logins

Not sure how to type this but here it goes . We want to set up auto logins for mutiple 'Nix boxes. OK here's the deal: we want to have a 'Nix box that stores a passwd in a variable, then we want other systems to look at that variable and auto login. Example scripts would be helpful!!! ... (1 Reply)
Discussion started by: Bodhi
1 Replies

2. UNIX for Dummies Questions & Answers

Number of multiple logins

How can i get the number of multiple logins of the user those are logged in currently... (1 Reply)
Discussion started by: Ramkum
1 Replies

3. 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

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

Configure Solaris to accept Active Directory user logins

Is it possible to configure a Solaris server to authenticate users against an Active Directory server when logging in via ssh? I've seen some docs out there, I've followed their instructions, but it does not work. And I'm beginning to wonder if it is possible or even supported by Oracle. The... (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

6. 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

7. Windows & DOS: Issues & Discussions

Fail2ban: email notifications and banning ssh IP logins

Hi all. I am using Cygwin in Windows 7 and am trying to setup fail2ban so that I can ban foreign IP addresses under SSH, also getting email notifications. I downloaded fail2ban and installed it. I then created jail.local copy from jail.conf and changed some values in jail.local. Now when I try to... (2 Replies)
Discussion started by: synthesis
2 Replies

8. Solaris

Disable Inactive User in Solaris 11

Goal: To disable a Solaris user, after that user was inactive for X days. My understanding for linux was that there was no systematic way to disable inactive users, therefore we had to set a password expiration via /etc/default/passwd, MaxWeeks; then in /etc/default/useradd (/etc/shadow), the... (1 Reply)
Discussion started by: Drasavokian
1 Replies

9. Shell Programming and Scripting

Cisco, 2 ssh logins for expect /bash

HI all i need to connect to about 900 cisco routers and switch to do some configs changes. the issue i am having is that half the devices have one set of username and password and the other half have another username and password. From expect or bash script i can ssh into a device and make... (0 Replies)
Discussion started by: quintin
0 Replies
PAM_LIMITS(8)							 Linux-PAM Manual						     PAM_LIMITS(8)

NAME
pam_limits - PAM module to limit resources SYNOPSIS
pam_limits.so [conf=/path/to/limits.conf] [debug] [set_all] [utmp_early] [noaudit] DESCRIPTION
The pam_limits PAM module sets limits on the system resources that can be obtained in a user-session. Users of uid=0 are affected by this limits, too. By default limits are taken from the /etc/security/limits.conf config file. Then individual *.conf files from the /etc/security/limits.d/ directory are read. The files are parsed one after another in the order of "C" locale. The effect of the individual files is the same as if all the files were concatenated together in the order of parsing. If a config file is explicitly specified with a module option then the files in the above directory are not parsed. The module must not be called by a multithreaded application. If Linux PAM is compiled with audit support the module will report when it denies access based on limit of maximum number of concurrent login sessions. OPTIONS
conf=/path/to/limits.conf Indicate an alternative limits.conf style configuration file to override the default. debug Print debug information. set_all Set the limits for which no value is specified in the configuration file to the one from the process with the PID 1. utmp_early Some broken applications actually allocate a utmp entry for the user before the user is admitted to the system. If some of the services you are configuring PAM for do this, you can selectively use this module argument to compensate for this behavior and at the same time maintain system-wide consistency with a single limits.conf file. noaudit Do not report exceeded maximum logins count to the audit subsystem. MODULE TYPES PROVIDED
Only the session module type is provided. RETURN VALUES
PAM_ABORT Cannot get current limits. PAM_IGNORE No limits found for this user. PAM_PERM_DENIED New limits could not be set. PAM_SERVICE_ERR Cannot read config file. PAM_SESSION_ERR Error recovering account name. PAM_SUCCESS Limits were changed. PAM_USER_UNKNOWN The user is not known to the system. FILES
/etc/security/limits.conf Default configuration file EXAMPLES
For the services you need resources limits (login for example) put a the following line in /etc/pam.d/login as the last line for that service (usually after the pam_unix session line): #%PAM-1.0 # # Resource limits imposed on login sessions via pam_limits # session required pam_limits.so Replace "login" for each service you are using this module. SEE ALSO
limits.conf(5), pam.d(5), pam(8). AUTHORS
pam_limits was initially written by Cristian Gafton <gafton@redhat.com> Linux-PAM Manual 09/19/2013 PAM_LIMITS(8)
All times are GMT -4. The time now is 01:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy