I thought that /etc/profile is only called if the user is using ksh.... So you may want to make sure all your users are using it....
We have many application user IDs that use csh....
Look at /etc/csh.login
Many thanks folks, this is very helpful. Small problem though, this Solaris box is basically a call-detail-records recording thingy (part of an Avaya (Lucent) PBX) and it looks as if it uses some propriatary software. In our field we call it CMS (short for call management system), and all users have /usr/bin/cms as their shell. Root is using /usr/bin/ksh. I think I better not start fiddling with this, except perhaps if I knew how a shell works. My guess is that that is a bit too complicated for this task though. Many thanks again, I appreciate your input.
I know I am a month behind, but I stumbled across this looking for a solution to something else.
I have a CMS machine from Avaya on which I implemented exactly what you want to do and it works fine, limiting uses to only one login on the CMS Supervisor app. You don't have to worry about "root" being locked out, because root doesn't use /usr/bin/cms.
Its not too complicated, and in fact its exactly the code that was mentioned by "olded".
/usr/bin/cms is just a simple shell script. You can edit it with VI like you would any text file and insert the lines below (cut and paste from my /usr/bin/cms). Once you have opened the file, just insert it after the comments.
#
# SHELL: cms
#
# Revisions and descriptions listing...
# more info
if [ `w -h -s| cut -d" " -f1 | grep "^$LOGNAME$" | wc -l` -gt 1 ]
then
exit 0
fi
# Rest of file below
I don't want to cut and paste anything from the file for fear of copyright infringent since this is a proprietary system.
Make a backup of course, and make sure permissions and ownership match. You should be good to go. The only annoying part is if a user tries to use the login twice, CMS Supervisor doesn't tell you that, it just blurts out an error about not being able to login (maybe something about checking a password, or server is currently being backed up.)
we are becoming crazy.
Following the above instructions we can avoid simultaneous login through Terranova or any emulator, but with CenterVu Supervisor still can log sereval sessions with the same login.
Has anyone done it in CenterVu Supervisor and working?
In my post on Feb 13, 2004 I did mention that I had gotten it to work on our Avaya CMS Supervisor, so I know it *can* work. Perhaps it depends on shell, O/S and CMS version.
Ours is running on a Sparc Ultra 5 with Solaris 8. CMS version is 11.0.something.
Check that your user(s) in question have a shell set something like below in /etc/passwd:
admin:x:200:200::/export/home/admin:/usr/bin/cms
Maybe you can cut and paste the modifications you made in /usr/bin/cms and I'll do my best to help out.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.