Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-09-13
3
Medium Priority
?
275 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

Introduction I've already written articles on how to set up a Hyper-V Cluster (http://www.experts-exchange.com/A_7910.html), and how we can benefit from Microsoft licensing grants within Hyper-V (http://www.experts-exchange.com/A_7831.html), but …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

916 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