Restricting Multiple loggin sessions


 
Thread Tools Search this Thread
Operating Systems Solaris Restricting Multiple loggin sessions
# 8  
Old 06-07-2005
MySQL

Thanks ppass
It worked (with li...ttle bit of change)

Cheers

Quote:
Originally Posted by ppass
you can add the following to the users profile :

USERLOGINS=`who | grep ( userid ) | wc -l`
if [ "$USERLOGINS" -eq ( max no. of logins ) ] ; then
exit 1
else
( process remaining environment )
fi


cheers
# 9  
Old 06-09-2005
But the user can just edit their .profile file and remove your checks.

It would be far safer to use the method I've indicated, placing it in the global profile in /etc/profile.

Also; what happens when you add 20 new users to the system? Have you modified the .profile file in /etc/skel? Have you hard coded the user name into the .profile? What happens when the wiley user wants to login more than X times and removes your checks from their writable .profile?

Using my method would solve all these issues.

Anyway.... Smilie

Cheers
ZB
# 10  
Old 06-09-2005
zazzybob;

Here's how I did it;
I edited the .profile in /etc/skel,

USERLOGINS=`who | grep $LOGNAME | wc -l`
if test $USERLOGINS -eq (x)
then
exit 1
else
([/I]process remaining environment)

..
Then I copied the .profile to the individual users $HOME

I'll deffinitely try out your method also. Thanks a lot.
# 11  
Old 06-09-2005
That should solve a few of the problems, i.e. it will be applied for new users added to the system, and the userids are not hard-coded into individual profiles - the only remaining issue would be if the user were to edit their .profile and remove the checking - and if your users are anything like most of the users I've looked after, they probably haven't even heard of a .profile file Smilie Smilie

Cheers
ZB
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sessions across multiple scripts.

I wish to be able to pass PHP values between multiple scripts. In each script, I have the following before any HTML code: <?php session_start(); session_name("STORE"); session_set_cookie_params( 'lifetime', '/var/www' ); session_id('Gingy'); ... (1 Reply)
Discussion started by: Meow613
1 Replies

2. Red Hat

multiple ssh sessions

Hi, I use OpenSSH to log on to a RH server but when I enter the password 2 session windows appear. I only need one so can anyone advise where I can rectify this? R, D. (2 Replies)
Discussion started by: Duffs22
2 Replies

3. Red Hat

Restricting multiple users to run only sftp server

Hello, can someone please provide steps, can I restrict a multiple users to only access only sftp on a server, to perform upload and download of files on their home directories. 1. I have updated their login shell as /sbin/nologin. anything else do I need to update. Thanks, (3 Replies)
Discussion started by: bobby320
3 Replies

4. AIX

Multiple sessions with xming

Hi. I installed xming to access to my servers but I have a problem : i can only have one session at a time ... i don't find any parameter to change this. Tks (3 Replies)
Discussion started by: stephnane
3 Replies

5. Solaris

NIS - Client Not loggin in

Friends n Gurus I am creating an NIS farm(Solaris only) in my office. I have successfully configured the NIS master and slave servers and a few NIS clients. However i am not able to log into a few of my NIS clients. The commands "ypcat passwd" is displaying the NIS user. However when i try to... (5 Replies)
Discussion started by: Renjesh
5 Replies

6. UNIX for Advanced & Expert Users

Multiple Sessions with FTAM

Just a quick question, Can I establish Multiple Sessions between two machines using FTAM? Regards, Gaurav Goel (0 Replies)
Discussion started by: gauravgoel
0 Replies

7. AIX

Locking a file when using VI to prevent multiple-edit sessions by diff users

At the office, we often have to edit one file with VI. We are 4-6 workers doing it and sometimes can be done at the same time. We have found a problem and want to prevent it with a file lock. Is it possible and how ? problem : Worker-a starts edit VI session on File-A at 1PM Worker-b... (14 Replies)
Discussion started by: Browser_ice
14 Replies

8. Shell Programming and Scripting

Creating multiple sessions

I have a program which gets an input file (which contain a list of objects) and processes the objects one by one sequentially. However when there are many objects it is faster to split the input into smaller lists and run the program in multiple terminal sessions simultaneously. I want to know if... (2 Replies)
Discussion started by: stevefox
2 Replies

9. Shell Programming and Scripting

Multiple PHP sessions within the same browser instance

Dear all..... I am currently writing a Help-Desk / Knowledge Base application using PHP/PostGreSQL. I authenticate the user using a quite elaborate mechanism of cookies. The problem is that using cookies (I also have a version using sessions with the same problem), I can only seem to get one... (4 Replies)
Discussion started by: zazzybob
4 Replies

10. UNIX for Dummies Questions & Answers

Loggin mail transfer

Hi Folks, I'm trying to log incoming and outgoing messages on my Solaris box. I thought I could use 'mail.info /var/log/maillog' in my syslog.conf but it doesn't give any output. mail.debug does but only seems to log client connections to the server and the odd message ID. Is there a way... (4 Replies)
Discussion started by: Ben
4 Replies
Login or Register to Ask a Question