|
Author | Topic: timeoutd (Read 580 times) |
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | timeoutd « Thread Started on Mar 20, 2012, 2:37pm » | |
Hallo, ich möchte ein Zeitmanagment einrichten, also einzelnen Usern bestimmte Nutzungszeiten zu weisen. Gefunden habe ich timeoutd und auch installiert. Konfiguriert über /etc/timeouts
z.B. Al:*:userb:*:NOLOGIN
danach /etc/init.d/timeoutd "reload" und "restart" ausgeführt
Das Problem ist nur, dass sich userb weiterhin einloggen kann.
Habe ich da was übersehen? Hat jemand einen Tipp für mich? Ich habe im englischen Forum bisher keinen thread dazu gefunden.
| |
|
casey972oo Elder Member
     member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/redcreature.gif)
GNU/Linux
Joined: Apr 2011 Gender: Male  Posts: 641 Location: Martinique
|  | Re: timeoutd « Reply #1 on Mar 20, 2012, 5:28pm » | |
Mar 20, 2012, 2:37pm, salnew wrote:Hallo, ich möchte ein Zeitmanagment einrichten, also einzelnen Usern bestimmte Nutzungszeiten zu weisen. Gefunden habe ich timeoutd und auch installiert. Konfiguriert über /etc/timeouts
z.B. Al:*:userb:*:NOLOGIN
danach /etc/init.d/timeoutd "reload" und "restart" ausgeführt
Das Problem ist nur, dass sich userb weiterhin einloggen kann.
Habe ich da was übersehen? Hat jemand einen Tipp für mich? Ich habe im englischen Forum bisher keinen thread dazu gefunden.
|
|
. Ja ! ... da hast Du ein neues Thema gefunden ... was bisher noch nicht im Forum war ! ... versuch mal das Ganze in englisch ... denn da bekommst Du wohl eher einen Rat ...
schreib einfach den gleichen ' post ' in englisch ... hier in diesem ' thread ' ...
wenn jemand einen Rat hat ... dann bekommst Du ihn ... vermutlich von ' @Anthony ' ... denn er weis was hier läuft ... oder nicht ...
casey972oo
.
|
casey972oo .. on ' Packard Bell Butterfly ' ! ... ' Intel Pentium SU41oo ' ... with ' SalineOS 1.5 ' ... entire disk ! ... |
|
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | timeoutd « Reply #2 on Mar 21, 2012, 3:31pm » | |
Hello
I want to set time limits on what time a user is allowed to login. I found timeoutd in the packages, installed it and configured it in /etc/timeouts also reloaded and restarted /etc/init.d/timeoutd
to test I did Al:*:userb:*:NOLOGIN
user is still able to login
what can I do? any hint?
is there another (easy to do) posibility to set session time limits?
greets
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: timeoutd « Reply #3 on Mar 22, 2012, 1:27pm » | |
As far as I noticed, timeoutd is for restricting longevity of one's login, not on what time you can login (but I'm not sure if I correctly understand what you want to do). Now I can think only about ugly solution, some root cron job for changing /etc/passwd but not sure if it will work
|
Skallagrigg |
|
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | Re: timeoutd « Reply #4 on Mar 22, 2012, 4:54pm » | |
thank you for your answer
manpage timeoutd says you can adjust a lot of different options I want to set exact times on what time the user can login. e.g. he should be allowed to login from monday to friday between 14:00 and 20:00 manpages timeoutd says that would be Wk2000-1400:*:userb:*:NOLOGIN that the rule, afterwards reload the script and restart.
the problem is it doesnt work für userb, login is possible all the time.
I tested timeoutd on an ubuntubox and it works very fine
I'm not familiar with cron.
| |
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,336
|  | Re: timeoutd « Reply #5 on Mar 23, 2012, 7:12am » | |
The appears to be a bug in Debian where the permissions of /usr/bin/at aren't set correctly, and SalineOS is suffering from it to. I am going to assume that timeoutd calls on /usr/bin/at at some point to actually run the commands. To fix, open a root terminal and issue this command: chmod u+s /usr/bin/at
Hopefully this sorts everything out for you.
| |
|
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | Re: timeoutd « Reply #6 on Mar 23, 2012, 2:53pm » | |
Hello thank you for your hint and help.
unfortunately it doesnt work
I'm puzzled
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: timeoutd « Reply #7 on Mar 24, 2012, 3:13am » | |
I installed timeoutd and it DOES work, the problem is, it only works in ttys, you can try to switch to other console by CTRL+ALT+F2 (to return to X press ALT+F7), and you'll not be able to login as your blocked user there (if you can login, then you need to block your user group also).
|
Skallagrigg |
|
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | Re: timeoutd « Reply #8 on Mar 24, 2012, 1:40pm » | |
thank you for help and for test it.
I tried in tty and the blocked user could login, also with group blocked.
I don't know what I'm doing wrong.
Thank you.
Is there another option to restrict user.
| |
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,336
|  | Re: timeoutd « Reply #9 on Mar 24, 2012, 2:31pm » | |
Yes, write a script and start it at boot. Put this in a text file, modifying as need be.
#!/bin/bash echo -e "NewPassword\nNewPassword\n" | passwd userb killall slim exit
Give it a name and put it in /usr/bin and make sure it is executable. This will change the userb's password to NewPassword, you can change it to anything you like just replace NewPassword with whatever. It will also log the user out, rather rudely.
Then all you need to do is run this script at the correct time, for this we will use at. To setup this to run at boot, add the below line to /etc/rc.local above the exit 0 line. echo '/usr/bin/whatever-you-named-the-script' | at 20:00 This will tell the script to be called at 10 PM, you can put 1-24 there, and 00 is minute 0 you can put 1-60 there.
You will have to make another script and add another line to rc.local to change the password back.
This is fool proof, as long as the computer gets booted up before the time at is set to run at.
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: timeoutd « Reply #10 on Mar 24, 2012, 2:35pm » | |
Timeoutd is not perfect, it needs around 1 minute to think, if you can login, wait that minute and see what you get. If you're still logged in after that, do you follow Anthony's instruction? If yes, do you have sudo installed ? I have sudo installed, maybe timeout is using it somehow? I'll check without sudo later.
|
Skallagrigg |
|
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | Re: timeoutd « Reply #11 on Mar 24, 2012, 3:14pm » | |
no, I think I haven't installed sudo, I worked with su.
I'll try with sudo again
Thanks
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: timeoutd « Reply #12 on Mar 24, 2012, 3:46pm » | |
Before trying sudo check if it's working after that 1 minute, and try Anthony's solution with chmod.
|
Skallagrigg |
|
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | Re: timeoutd « Reply #13 on Mar 27, 2012, 4:06am » | |
thank you for your help!
I'll give it a try the next days and will post the result.
| |
|
salnew New Member
 member is offline
![[avatar] [avatar]](http://images.proboards.com/avatars/linux.gif)
Joined: Mar 2012 Posts: 10
|  | Re: timeoutd « Reply #14 on Aug 1, 2012, 3:11pm » | |
hello 
sorry for being so late. I was held busy with reallife. 
thanks Anthony, I wrote the scripts as you recommended and finaly it works very fine.
thank you all for your help.
| |
|
|