Solved

Forcing user logout from within a user login script

Posted on 2007-11-27
5
772 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

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

15 Experts available now in Live!

Get 1:1 Help Now