Solved

Remotely Log off a User Session

Posted on 2011-03-09
6
841 Views
Last Modified: 2012-05-11
Does anyone know of a command and/or easy process that would allow me to end a user's session via a command and/or batch process?

We have supervisors in our plants that go out onto our plant floor and potentially log in to a computer on the plant floor. Then when they get back in the office, they realize they might have forgot to log off their session on the plant floor. We only allow 1 session per user, so they have to go all the way back out to the plant before they can use their login again.

I would like to write a script of some kind that, given the user profile name, I can end that session.  The only way I could think of doing it was with the ENDJOB...but you have to know the job number, which I wouldn't know.

Any ideas?

Thanks!
0
Comment
Question by:Matthew Roessner
  • 2
  • 2
  • 2
6 Comments
 
LVL 5

Expert Comment

by:stevebowdoin
Comment Utility
can you do any progrmming?
the users msgq will be locked.  you can use wrkobjlck or the QWCLOBJL api to determine the job info.  once you have that then ENDJOB.

Steve Bowdoin
0
 
LVL 34

Expert Comment

by:Gary Patterson
Comment Utility
Easy interactive method:

WRKUSRJOB USER(BADUSER) STATUS(*ACTIVE)
Option 4

Scripting it is a little trickier, as Steve indicates, but WRKUSRJOB makes it so easy, there is hardly a point in going to the trouble.

- Gary Patterson
0
 
LVL 1

Author Comment

by:Matthew Roessner
Comment Utility
I actually would like to come up with a programatic way of ending the user. My plan was to have a website that the enduser could go to and cilck "END SESSION" and when they clicked on that, I would submit a program via FTP remote command (or something like that).
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Accepted Solution

by:
stevebowdoin earned 250 total points
Comment Utility
Looks like you will need to do some programming.

BTW.  Do you have exit programs protecting that FTP server?  Most sites limit sessions to 1 as a security measure.  It would be odd to allow only one session and not lock down the FTP server.  

Steve
0
 
LVL 34

Assisted Solution

by:Gary Patterson
Gary Patterson earned 250 total points
Comment Utility
Then you'll need to do a little coding.  What programming and scripting languages are you comfortable with?

If you know Java, then you can do it all in your web application using the JT Open library

http://jt400.sourceforge.net/

the JobList class allows you to retrieve a list of jobs by user, and the CommandCall class lets you execute a command.

- Gary Patterson

0
 
LVL 1

Author Comment

by:Matthew Roessner
Comment Utility
I ended up righting a CL program using the QWCLOBJL API.  I was able to get the program to work and then call it via FTP (using a particular user that we have set up that has authority to end jobs)

Thanks for your help
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now