- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Concurrent Logins and Virus Protection on HP-UX 11...
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
06-18-2001 01:47 PM
06-18-2001 01:47 PM
We have a Trusted System and it's not NIS or
NIS+. It's HP-UX 11.0 and it's a R390.
How do we prevent concurrent logins, users with
the same login logging in more than one time?
We don't want a user ie. joeuser to be active more than one session at a time.
Also is there any virus protection for our
HP-UX? I think this is probably a stupit question on my part since I really believe the
answer is NO but I would like to hear this from
someone else.
We need to make our Web Unix box as secure as
possible with our logins.
Thank you for your help...
Laurie
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2001 04:01 PM
06-18-2001 04:01 PM
SolutionNow to your first question - There is no way that I know of built into HP-UX to prevent a user from logging in more than one session at a time. Something you could do is add something like the following to /etc/profile to check if the user is already logged in and if so don't let them log in again. Be warned that I am not guaranteeing that the syntax of the following will be exactly correct.
NUM_LOGINS=`who | grep $LOGNAME | wc -l`
if ( NUM_LOGINS >= 1 )
then
echo "You are already logged in once."
echo "No more sessions allowed."
exit
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2001 04:25 PM
06-18-2001 04:25 PM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
The question of viruses has come up a couple of times. I think Bill Hassell addresses it pretty well here;
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe0a2d1e5762fd5118fef0090279cd0f9,00.html
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2001 05:38 PM
06-18-2001 05:38 PM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
There is one UNIX based anti-virus suite that I am familiar with. Check out http:\\www.sophos.com. It's main function is to spot PC virus'es in sendmail servers and it does run on HP-UX. In general, the UNIX 'market' is too small and too specialized to attract the bad guys. However, if your UNIX server is serving up files for PC's (Samba, NFS) or is a mail server then loking into a centralized anti-virus program makes sense. I have found that the sophos guys are not as quick about getting new virus signitures and fixes as the PC based products are.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2001 06:46 PM
06-18-2001 06:46 PM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
As for Virus' in any UNIX, they simply dont exist. Other than what Bill Hassel mentions in the previous posts URL, there is another very important feature in All Unices which render virii pretty useless. And that is process control.
If jondoe runs a program, it can only damage his files and processes. Since even a command like "rm" can be modified to reak havoc on a Unix box, it would require root access to replace the binary that users would normally use.
This happens, but usually by lazy admin who launch trojans, and not really a virus. Knowing your systems, setting proper paths, and proper rotation and use of passwords, and security patching should nullify trojans!
If there was such a memory resident virus, only that users files and programs could be manipulated. This gives ready access to isolate and find the problem!
Microsofts made yet another half-a$$ implemetation of process control in Win2K, as well as other problems that they stuff down peoples throat. I.E. enabling execution of VB script in everything they sell with no ability to turn it off! Of course the AV distributors love it, cuz everyone that uses MS has to buy one. ISP's love it, cuz they can track you, load software on you without you knowing, etc...and support companies love to sell it to you cuz what a better way of getting repeat business than selling people brand new broken junk!
Unix(HP-UX, Solaris, AIX, IRIX, and even Linux) are made to be a complete package, that works from the get go...Years and years have gone into refining the process controll, networking, file systems, etc...
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 06:46 AM
06-19-2001 06:46 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
I get this error:
/etc/profile[131]: NUM_LOGINS: not found.
Also what is a XDCMP client?
Thanks,
Laurie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 09:30 AM
06-19-2001 09:30 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
mechanism for an Xterminal to request a session from a remote host...
go ftp://ftp.x.org/pub/R6untarred/xc/doc/hardcopy/XDMCP/xdmcp.PS.Z
for detailed docs...
RD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 09:51 AM
06-19-2001 09:51 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
Put the dollar sign ($) in front of the NUM_ variable name in the if statement, NOT where it is assigned a value.
:-) -- jls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 10:13 AM
06-19-2001 10:13 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
Check in your passwd file for your shell.
If your shell is csh or tcsh then
set NUM?????
if ($NUM???.....) and so.
sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 11:00 AM
06-19-2001 11:00 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
prevents root from having more than one login,
which I don't like.
Here's my code from /etc/profile, note I have
bourne shell:
typeset -i NUM_LOGINS
NUM_LOGINS=`who | grep $LOGNAME | wc -l`
if ((NUM_LOGINS > 1))
then
echo "I am sorry. You are already logged in once to the Server."
exit
fi
How to I not apply this to my root login?
I though root just looks at the /.profile
it also seems to execute /etc/profile.
I have tried using the grep -v root and
if (($LOGNAME <> "root")) then... and I
can get it to not work for root, but then it
stops working for all other id's...
Any thoughts on how to change this just for
non-root users???
Laurie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 11:08 AM
06-19-2001 11:08 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
if ( $LOGNAME != root )
then
NUM_LOGINS=`who | grep $LOGNAME | wc -l`
if ( $NUM_LOGINS > 1 )
then
echo "STUFF!!!"
exit
fi
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 11:17 AM
06-19-2001 11:17 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
above and I get this error from root and non
root:
etc/profile[132]: lkrumrey != root: The specified number is not valid for this.
etc/profile[132]: root != root: The specified number is not valid for this.
It seems like I can either have this work for
all logins or none. I can't seem to pull root
out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 11:37 AM
06-19-2001 11:37 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
I just tried the following in my /etc/profile and it works for all ids as long as the shell is /sbin/sh
if [ "$LOGNAME" != "root" ]
then
NUM_LOGINS=`who | grep $LOGNAME | wc -l`
if [ $NUM_LOGINS > 1 ]
then
echo "ALready logged in once"
exit
fi
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 11:56 AM
06-19-2001 11:56 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2001 03:12 PM
06-19-2001 03:12 PM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
I_AM=`whoami`
typeset -i LOGINS
if [ "${I_AM}x" = "x" ] ; then
echo "I DONT KNOW YOU!"
echo "GOOD BYE!"
exit 2
elif [ "${I_AM}" = "root" ] ; then
echo "" >>/dev/null
#FALL THROUGH
else
LOGINS=`who -u|grep ${I_AM}|wc -l`
if [ ${LOGINS} >= 1 ] ; then
echo "You are already logged in!"
echo "Disconnecting"
exit 2
fi
fi
Syntax is kind of a pain in the butt!
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2001 07:01 AM
06-20-2001 07:01 AM
Re: Concurrent Logins and Virus Protection on HP-UX 11.00
LOGINS=`who | awk ' { print $1 } ' |grep "^${I_AM}$" |wc -l`
The awk statement isolates the first word (login ID). The "^" and "$" at the beginning and end of the grep string mean "beginning of line" and "end of line" repectively.
This will prevent user "john" from being lockout because "john2" is logged in, or user "pts" being locked out because someone else is logged in on "pts/2", which would be the case with most of the code that has been posted to date...
I have been burnt so many times with the grep command in the past. Beware...