LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-28-2005, 10:10 AM   #1
Menestrel
Member
 
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Rep: Reputation: 30
Allow a user to use gaim only at a certain time of the day


How can I restrict an user, to access the internet, or just use gaim at a certain interval every day ?
 
Old 06-28-2005, 10:37 AM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
A bit of a hack could be to run a cron-job as root to change the permissions on gaim. One job to a-x and another to a+x when you want to allow it again. I don't think it's particularly elegant, however, and there is probably a better way of doing so.

Apologies for not being too useful,
- Piete.
 
Old 06-28-2005, 10:41 AM   #3
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
Wouldn't it just keep running cause the x is only checked when you start the program?

edit I'd do it with a cronjob which blocks and unblocks the ports gaim uses with IPtables. Can't help you with the code for it though.

Last edited by darkleaf; 06-28-2005 at 10:43 AM.
 
Old 06-28-2005, 10:55 AM   #4
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Or a crontab that changes the permissions and also runs "killall gaim"
 
Old 07-03-2005, 02:12 AM   #5
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
I suggest configuring iptables to block Gaim's ports at regular intervals. Chmodding would do the trick, but it can be circumvented quite easily. If you want to keep your small children (or your wife/husband out of Gaim for a while, chmodding could be enough, however.

I think you should also install anacron, because otherwise, if the system is down during the time when the chmodding/iptabling should take place, it doesn't. It's only a matter of time when users realize this.

Anacron handles cron jobs that have been skipped due to downtime.
 
Old 07-04-2005, 12:30 AM   #6
Menestrel
Member
 
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Original Poster
Rep: Reputation: 30
chmod-ing did the trick... but now I want something else. I want to allow a total amount of 3 hours of gaim usage per user , how can I do that ?
 
  


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
Limit time for a user per day davholla Linux - General 11 08-22-2004 02:14 PM
time of day problem gw1500se Mandriva 9 03-23-2004 09:25 AM
ls sometimes year sometimes the time of day suguru Linux - Software 1 02-18-2004 10:27 PM
first time linux user, frist day with mandrake9.1 on my system. Sabastian Linux - Software 34 06-19-2003 11:10 PM
first time linux user, frist day with mandrake9.1 on my system. Sabastian Linux - Newbie 4 06-18-2003 02:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:49 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