LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-12-2004, 08:44 AM   #1
wylie eyed
LQ Newbie
 
Registered: Oct 2003
Posts: 3

Rep: Reputation: 0
Question user account timed access


I've just acquired a magnia sg20 which uses RH 7.3. i am setting up user accounts but would like to know how i can time restrict the account log-ons i.e child number 1 can access between 4 and 5 everyday child 2 can access between 4.30 and 7... you get the idea. alternative idea would be to restrict users to say 1 hour's access a day but it's timed from when they log on til they log off so if they logon on at 2 and off at 2.20 they have used 20 mins of allocated time that day and can still log on as many times as they want in the day til they exhaust their 1 hour time.

can anyone help with this one?

Last edited by david_ross; 01-12-2004 at 12:54 PM.
 
Old 01-12-2004, 03:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Have a look at


man logoutd
man porttime


Cheers,
Tink
 
Old 01-12-2004, 04:13 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
These are my thoughts on your problem. Somebody who is a system administrator in a large organization might be able to give you a better answer.

You could use crontab to set the timing. Crontab is a facility to run certain commands at set times daily, weekly, monthly, or even on specific dates like December 25. See:
man crontab
man cron

Then at the specified times you can throw off the users whose time has expired with the killall command (I think. I have never had to throw a user off my computer so I am guessing that killall is the command to use.) At the same time you change the password for the expired user to something unknown by that user. When a user's new time slot comes around you use cron again to change the user's password back to the one he/she knows. See:
man passwd

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 01-12-2004 at 04:19 PM.
 
Old 01-12-2004, 04:53 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Why not just use logoutd, though? :)
 
Old 01-12-2004, 05:54 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Tinkster,

I clicked on the "view threads with 0 replies button" and leisurely read my way through some of them. When I clicked on this thread and decided to answer it showed no replies. When I submitted the reply it showed me that you had replied in the meantime. I was puzzled by the 15 minute time difference in our replies but maybe I am that slow, I don't know. I did have to read through some man pages before I decided on killall.

So I am not contradicting you, we just gave different answers in parallel.

---------------------
Steve Stites
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB flashdrive access with user account?? servnov Linux - General 1 08-30-2005 10:04 AM
Other users have access to my user account? BajaNick Linux - Software 2 04-11-2005 11:08 PM
can not access directory from user account - only root walterbyrd Linux - General 1 03-04-2005 11:23 PM
cant access my windows drive in my user account Polyfaux Linux - General 5 02-21-2004 07:08 AM
Can Access Sites with root but not user account Obelus Linux - Networking 4 12-21-2003 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:02 AM.

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