Thank you for this excellent suggestion. We tested the dtach program and it work as promise. Are testing shows that the dtach program will not be suitable for our environment. A Record lock in the application is another reason that users disconnect and log back into another session. The dtach program brought these users right back into their locked session.
Thanks Charlie -----Original Message----- From: linux-poweredge-boun...@lists.us.dell.com [mailto:linux-poweredge-boun...@lists.us.dell.com] On Behalf Of Eric Wood Sent: Thursday, July 09, 2009 9:40 PM To: linux-poweredge@lists.us.dell.com Subject: Re: Bash Script Help Needed Charlie Hill wrote: > > I need to write a script which will kill duplicate login users in Red > Hat. > you can possibly use dtach in each user's .bash_profile login script: dtach -A /tmp/dtach.$USER /bin/bash the dtach package is handy to reconnect users to a lost or drop shell sessions thus preventing file corruptions. They guarantees them to use one "session" until proper exit. you might have to play with various screen redraw methods (see man page). I had to edit the source to send a special redraw char. Also, you can monitor for dtach orphans too: cat /proc/net/unix |grep dtach | cut -f6 -d"/" |sort | uniq -u -eric wood _______________________________________________ Linux-PowerEdge mailing list Linux-PowerEdge@lists.us.dell.com https://lists.us.dell.com/mailman/listinfo/linux-poweredge Please read the FAQ at http://lists.us.dell.com/faq _______________________________________________ Linux-PowerEdge mailing list Linux-PowerEdge@lists.us.dell.com https://lists.us.dell.com/mailman/listinfo/linux-poweredge Please read the FAQ at http://lists.us.dell.com/faq