Solved

Forcing user logout from within a user login script

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

We asked our MSP customer base what their favorite tools were and how they help them serve clients. We focused our questions on favorite tools in the following categories: >PSA tools >RMM tools >Alert management tools >Communication tools and Mo…
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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