Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

killing inactve logons done via tcpip.

Posted on 1997-11-18
5
Medium Priority
?
282 Views
Last Modified: 2013-12-23
I have inherited responsibility for a SPARC SOLARIS 5.5 system. The problem is simply that of users leaving for the night by shutting down their pc's. Connection to the Unix system is via tcpip In the morning, the users sign on again, and instead of having unique sessions, they are on
twice, or more often.

Can someone refer me to a skeleton script or to the name of a text book whereby the clues as to how to  route the output from the "ps -ef " and "who"  commands  to some script that would eliminate the surplus/hung
logons. Essentially, I want to eliminate users whose sessions have been inactive for a certain amount of time.  Your help would be appreciated.

BTW, with dialup, there is no problem. The user's session is killed.
0
Comment
Question by:leslie1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

by:eugene12
ID: 1582990
This sounds like it could best be handled by using perl and a cron file. A good book is "teach yourself perl 5 in 21 days" that should allow you to set up the perl script. The cron file will allow this to be done unassisted late at night.
0
 

Author Comment

by:leslie1
ID: 1582991
I appreciate the recommendation to look at perl. However, I don't know if perl is even installed on our system. Assume
that our system is vanilla. The only thing we do with it is run MK, a business package from Computer Associates.   CA will support their application, but not unix.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 1582992
Use csh, tcsh (or similar) as login shell and set the autologout shell variable to an apropriate time.
0
 

Author Comment

by:leslie1
ID: 1582993
In the VM operating system (which is not unix), there was the
possiblity to stack the output from a command, and then to read the stack.  If I could stack the output of ps -ef, and then pass
it to a shell, my job would be done. Alternatively I could pipe the output from PS to a program which would analyse the output from PS and react accordingly.

Switching shell's is an idea I will explore. However, I am concerned that I should delete only the shell tasks that are started, and not the daughter tasks.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1582994
a quick'n dirty check for such users could be:
   ps -ef|awk '($8 ~ /^-/){print}'

Killing the login shell should also kill all its children.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question