- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to restrict or kill if a user have more th...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2004 12:35 AM
05-24-2004 12:35 AM
i have BaaN Erp Software on my hp-ux11i and
BaaN clients installed on W2k-nt-xp machines
so they connect to system from a GUI.i have license problem so i want every users must have a single process so no chance to 2nd proc
if users try then want my system to logout 2nd
proc request...but how?
Please share your precious decisions...
Best Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2004 12:41 AM
05-24-2004 12:41 AM
Re: how to restrict or kill if a user have more than one process?
[ `who am i|wc -l` -gt 1 ] && exit
in the users .profile
However, doing it per process is going to be a problem because you can't be sure how many processes a user is going to use in a single session. Maybe the GUI forks off another process to do a bit of work from time to time.
Maybe I am mis-understanding you though, that does happen quite a lot :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2004 12:44 AM
05-24-2004 12:44 AM
Re: how to restrict or kill if a user have more than one process?
Just wrap the Baan startup file in a shell script and advise users to use that script to startup Baan.
like
x=`ps -ef|grep Bann|grep -v grep |wc -l`
if [ $x -eq 0 ]
then
else
echo you cannot start more than one Baan process
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2004 12:53 AM
05-24-2004 12:53 AM
SolutionAdd this line to the file
NO_LOGINS_ALLOWED=x
This applies to non-root users only.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2004 01:31 AM
05-24-2004 01:31 AM
Re: how to restrict or kill if a user have more than one process?
Thank's so much for your kind concern...
Here is my system specs below;
#ps -ef|egrep -i bshell|wc -l
131
#ps -ef|egrep -i bshell|sort -n
ut4eo 28986 28985 21 08:48:39 ? 7:14 bshell (ut4eo@MNTRANKPC000357:688/SOCKET) -1 545 0 1
ut4es 25537 25536 0 15:31:11 ? 0:00 bshell (ut4es@ma061ut4es:392/SOCKET) -1 545 0 1
ut4fk 3766 3764 4 13:48:25 ? 3:26 bshell (ut4fk@ma140ut4fk:496/SOCKET) -1 545 0 1
ut4ha 22610 22609 0 15:07:07 ? 0:03 bshell (ut4ha@MNTRANKTPC00353:1896/SOCKET) -1 545 0 1 -set BSE_
ut4ia 28105 28104 0 15:53:32 ? 0:00 bshell (ut4ia@ma023ut4ia:1100/SOCKET) -1 545 0 1
ut4me 3020 3019 0 13:42:13 ? 0:02 bshell (ut4me@mntranktpc00681:2140/SOCKET) -1 545 0 1
ut4me 4396 4395 0 13:54:22 ? 0:22 bshell (ut4me@mntrankpc000412:804/SOCKET) -1 545 0 1
ut4me 15502 15499 0 14:08:07 ? 1:00 bshell (ut4me@mntranktpc00683:824/SOCKET) -1 545 0 1
ut4me 21328 21327 0 14:56:06 ? 0:03 bshell (ut4me@mntrankpc000418:856/SOCKET) -1 545 0 1
ut4mk 28471 28470 4 15:55:32 ? 0:00 bshell (ut4mk@mntranktpc00409:195/SOCKET) -1 545 0 1 -set BSE_L
ut5aa 1706 1705 0 13:33:01 ? 1:00 bshell (ut5aa@mntranktpc00064:324/SOCKET) -1 545 0 1
ut5at 25077 25076 0 15:28:16 ? 0:00 bshell (ut5at@ma045ut5at:1636/SOCKET) -1 545 0 1
ut5ek 19511 19510 0 14:40:34 ? 2:48 bshell (ut5ek@mntrankpc000212:1324/SOCKET) -1 545 0 1
ut5ho 15924 15923 0 14:10:30 ? 0:52 bshell (ut5ho@mntranktpc00712:836/SOCKET) -1 545 0 1
ut5md 28198 28196 2 15:54:38 ? 0:00 bshell (ut5md@ma045ut5md:1400/SOCKET) -1 545 0 1
ut5oa 25747 25744 0 15:33:50 ? 0:01 bshell (ut5oa@mntranktpc00507:1036/SOCKET) -1 545 0 1
ut5sk 26652 26651 0 08:21:26 ? 0:13 bshell (ut5sk@ma011ut5sk:96/SOCKET) -1 545 0 1
As you seen BaaN depends on proc name bshell..
i have put some restriction lines in users .profile file but not executed!!!!
they are still able to logon system...
via telnet i have written a syntax below;
num=1
if [ $( who | grep -c $LOGNAME ) -gt $num ]
then
echo you can not logon system because
you have still proc at least!!!
exit 1
fi
it works!!! but users have a BaaN client GUI software installed on their PC's and there is
configuration menu like;
Host name:ip adress of my hp-ux
Connect As:login(hp-ux loginname)
BShell Env;
BSE:/baan/bse(hp-ux path)
BShell name:bshell
Command:
So all settings that i have...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2004 01:42 AM
05-24-2004 01:42 AM
Re: how to restrict or kill if a user have more than one process?
Peace, R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2004 07:13 PM
05-24-2004 07:13 PM
Re: how to restrict or kill if a user have more than one process?
Could you please try to give brief detail about
RAC?i do not have any information...
Best Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2004 04:45 AM
05-25-2004 04:45 AM
Re: how to restrict or kill if a user have more than one process?
#!/bin/ksh
proc_say=1
aktif_proc=`ps -ef|egrep -i bshell|grep -v grep|egrep -i ut1ct|grep -c ut1ct`
if [ $aktif_proc -gt $proc_say ]
then
kill -9 `ps -ef|egrep -i bshell|grep -v grep|egrep -i ut1ct|tail -1|awk '{print $2}'`
else
exit 1
fi
This is for test for single username "ut1ct"
So How can i run this script in every seconds???
Please Help,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2004 04:56 AM
05-25-2004 04:56 AM
Re: how to restrict or kill if a user have more than one process?
you do not want to run this process every second, as it will kill your machine's resources to start with.
I could not quite understand how the two different types of logins, one via telnet, other via GUI can be differentiated ? what does the GUI do on the server ? Does it log in using the username and password and execute one command and exit right after that ? or how does it work ? If there is a client/server architecture set, and there is a server process listening the connections from GUI clients, they will circumvent the .profile totally.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2004 07:31 PM
05-25-2004 07:31 PM
Re: how to restrict or kill if a user have more than one process?
/etc/default/security
file.
It should be the cleaner solution to avoid multiple logins to non-root.
try it before other solutions.
Peace, R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2004 08:10 PM
05-25-2004 08:10 PM
Re: how to restrict or kill if a user have more than one process?
i do not have a such kind of file...
i have hp-ux11i and 11.00
/etc/default/security
so should i create?if so what is the ACL options?
King Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2005 06:46 PM
05-22-2005 06:46 PM