LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-04-2016, 10:47 PM   #1
emacsx
LQ Newbie
 
Registered: Feb 2016
Posts: 11

Rep: Reputation: Disabled
Question How to start vnc server for specific users on specific day?


I have an issue that there are total of 40 users for which I have to start vnc server, but only first 20 should get access on Monday and only the rest of 20 should have access on Tuesday. Right now I have to manually edit the /etc/sysconfig/vncservers file each day by commenting out the users which shouldn't have access on that day.

Is there a simple way to automate this process, lets say by writing a script?
BTW I am using Red Hat Linux 5.
 
Old 02-04-2016, 11:47 PM   #2
jaiarunk_s
LQ Newbie
 
Registered: Oct 2008
Location: Bangalore
Distribution: RHEL 5
Posts: 9

Rep: Reputation: 0
Hi Emacsx

I don't have vnc knowledge much, since you asked about script I can suggest keep a script which can replace the files through cron jobs on weekdays basis.

Thanks
Jai
 
Old 02-05-2016, 09:16 AM   #3
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
As jaiarunk_s said, you can get cron to automatically do this for you.
Create 2 files /etc/sysconfig/vncservers.monday and /etc/sysconfig/vncservers.tuesday
Then configure a cron job that does 'mv /etc/sysconfig/vncservers.monday /etc/sysconfig/vncservers' and runs on Monday morning
and a separate cronjob for Tuesday ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server hang and auto reboot in specific time of day trung1490 Linux - Server 4 10-31-2015 02:09 AM
[SOLVED] Direct specific client to specific server via DNS !! shahzaibcb Linux - Newbie 15 07-12-2014 02:09 AM
Routing specific users through specific interfaces. metaf5 Linux - Networking 2 12-23-2013 09:16 AM
Script Help -- documenting specific users that log into server SecureScript Linux - Newbie 2 11-17-2011 10:28 PM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration