multiple login sessions

I have a question. I have users logging into our Ultra Enterprise 5000 from more than one workstation. Is there a way to limit their ability to log in to the E5000 to one session(at a time) only. We have a limited number of user licenses for our Database application.

We have users logging other people in instead of requesting a username and password for them or they just want to have sessions open at different computers so that they don't have to go back and forth.

Please help, I wan them to be able to open one session at a time only.

Thank you,

Juan...

[598 byte] By [juanm@afrc] at [2007-11-25 23:24:22]
# 1
Hi !Does anybody know what I am asking ? If not, please let me know so that I can either rephrase the question or go somewhere else to get an answer OR am I in the wrong forum?.Thank you
juanm@hotmail at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 2

If you're talking about altering your system to limit the number of UNIX logins, you may have to write a login wrapper that you'd drop in place of the existing /bin/login (renaming it to another filename). Then in the wrapper, you check for the user or some particular shell or some unique identifier that establishes the difference of this user and all the others on the system. If that user has logged in previously, warn them then kick them out, and if not, let them in.

It's a little scripting effort, but it's very doable.

jeffreys at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 3
the only thing you have to remember is that you've got the wrapper on the system - when you plan on patching your SUNWcsu package.
jeffreys at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 4

Writing a wrapper around /bin/login & replace it with /bin/login? Mmmm.. I don't think we need such a tough work-around for this problem.

Better idea would be to write a small shell script and call it from /etc/profile (bourne shell). If the user is already logged-on (U may do "who,w, ps" or whatever chks U want to perform), simply exit with an error message on his terminal. If he is not logged-on, give him shell.

Easy 'eh?

CHeerz,

Rama

===.

tuxedough at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 5

Thanks, that sounds like simpler to do because I do not have access to the code to modify the login file in /bin

Now, the question is if I do "who" for example what would be the parameter or variable that I am testing or looking for.I know I will be looking for the user's login name but how do I know who the user name is. I am a novice so I hope that I am phrasing the question properly.

Thank you.

juanm@hotmail at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 6

> Now, the question is if I do "who" for example what

> would be the parameter or variable that I am testing

> or looking for.I know I will be looking for the

> user's login name but how do I know who the user name

> is.

hi juan

you get it with:

-->who | grep $LOGNAME

type:env <return>to get a small overview of your shell's environment variables

a glance athttp://docs.sun.com/db/coll/47.17could be worth too. ;-))

cheers,jenny

Jenny_S at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 7
Thank you, Jenny.I did man on login and I was able to figure it out.Thank you to all of those guys/gals for your input.Juan
juanm@hotmail at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 8

Hi :

I really need your help again.I have created the script.

The scripts verifies if the user trying to log in is already logged on. If that's the case then it displays a message telling the user that they are already logged. So far it only works for me. But when I log in as a different user it does not work.

How can I make the script work for every user that tries to log on to the Solaris system?

I will appreciate a prompt response.

Thank you,

Juan...

juanm@hotmail at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 9
Hi. Where are you calling your script from. If you wish it to apply to all users, you'll need to call it from /etc/profile rather than .profile in your home directory, as I suspect is the case. Perhaps you could confirm this? Cheers.
kencunningham at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 10
I call the script from /etc/profileI invoke it in the following manner: ./usr/sbin/scriptnameThank you,Juan
juanm@hotmail at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...
# 11
Thank you guys/gals for all of your help.My script is now working. The reason why it was not working even though it called from /etc/profile was because we have some usernames longer than 8 characters.Thank you,Juan...
juanm@hotmail at 2007-7-5 18:11:24 > top of Java-index,General,Talk to the Sysop...