Solved

Forcing user logout from within a user login script

Posted on 2007-11-27
5
786 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
[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
 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

A look at what happened in the Verizon cloud breach.
Part One of the two-part Q&A series with MalwareTech.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

630 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