Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Forcing user logout from within a user login script

Posted on 2007-11-27
5
Medium Priority
?
792 Views
Last Modified: 2010-05-18
I have a need to prevent a certain user account being used on a subset of computers, all connected to the same Netware tree.

I thought about doing this in the user's login script. Each of our PCs has an environment variable called '_locn' that identifies where it is geographically. We currently use this in the login script to do lab-specific stuff. All the PCs we want to prevent the user using share the same '_locn' so I was thinking something along the lines of:

if "%<_locn>" = ".location4.workstations.tree" then
      ; Display a popup saying this account is disabled in this lab with maybe a timeout
      ; Logout user after they click OK
end

I cannot find an easy way to do this. Any ideas?

Workstations have the Novell Client 4.91SP3 installed, and Zen for Desktops v7 is used for DLU on accounts.
0
Comment
Question by:comtmgr
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:martinum
ID: 20359614
Use ConsoleOne:
In the User package policy, in Dynamic Local User, select theLogin restriction page. There you can Include or exclude the workstation the user can login in to.

This requires that you have imported your workstation in to the eDirectory.
0
 

Author Comment

by:comtmgr
ID: 20364050
Unfortunately our User package is centrally controlled so I cannot make any modifications to it. Anyway I believe this would restrict all DLU accounts from using those workstations. I only want to prevent one user from logging in to this subset, all others must still be allowed. This one user is a shared account used by our students when they haven't yet setup their own.

Thanks.
0
 
LVL 1

Expert Comment

by:martinum
ID: 20373362
To bad you cant control the user packages. And I agree that you would have to create a special user package:DLU for that user otherwise no one can login. But I realize I didn´t write it in my previous post.

Sorry, but I cannot come up with an other solution right now. Good luck!
0
 

Accepted Solution

by:
comtmgr earned 0 total points
ID: 20394572
Solved myself by putting this in the login script:

if "%<_locn>" = ".location4.workstations.tree" then
      DISPLAY SYS:\NO_LOGIN.TXT
      @SHUTDOWN -L -F
end

Not very elegant but it does the job.
0
 
LVL 5

Expert Comment

by:floyd99
ID: 20633256
i was going to suggest exactly what you already found, use the shutdown command :)  i did this for a similar purpose and it works an absolute treat.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

879 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