Solved

VPS: Restrict Access for a user for specific period of time

Posted on 2011-09-13
3
266 Views
Last Modified: 2012-08-13
Currently i shared my VPS admin login with my co-worker. Now i would like to know if there a solution so i could restrict him to log on my VPS for specific period of time ?

ps: i already create his user login.
0
Comment
Question by:veematics
  • 2
3 Comments
 
LVL 9

Expert Comment

by:Lester_Clayton
ID: 36542480
In a Windows Active Directory environment, you can set an account to expire.  You cannot do this on standalone servers, which is what I suspect you will be running, so here's another idea:

Create a Scheduled Task to disable the account using the command line:

Net user John /active:no

Assuming, that John is the account name of your co-worker.

Because NET is a command, and not an application, you will probably have to wrap this in a CMD.EXE, so your application will run C:\Windows\system32\cmd.exe with the parameters /C "
Net user John /active:no"

Be warned though, that if your co-worker is a local administrator - he can find the scheduled task and disable it.
0
 

Accepted Solution

by:
veematics earned 0 total points
ID: 36564606
After browse site to site, i finally found the solution on microsoft site:
hxxp://support.microsoft.com/kb/816666

The easiest solution are:
net user john /time:M-F,08:00-17:00  

for restrict user john to only able access the server from monday to friday 08:00-17:00

and
net user john /time:all

to disable the logon restriction

Thanks
0
 

Author Closing Comment

by:veematics
ID: 36591871
found the answer myself
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Introduction There are many ways to achieving a goal - some are wrong, some are right - and some just appear to be right, but are wrong.  Hyper-V Clustering and VMM has taught me all three, and I'm here to share with you how to avoid the pitfalls…
Every once-in-a-while, when you try to add a XenServer host to the System Center Virtual Machine Manager console, it will generate a certificate error, and the XenServer host will not be added to Virtual Machine Manager: If you are experiencing t…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

18 Experts available now in Live!

Get 1:1 Help Now