Solved

Forcing user logout from within a user login script

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
Note: This is the third blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   We’ve been talki…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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