LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-01-2019, 10:30 AM   #16
Geist
Member
 
Registered: Jul 2013
Distribution: Slackware 14 / current
Posts: 442

Rep: Reputation: 196Reputation: 196

Make a compelling, rewardingı case for not staying on the computer all the time, that works the best and is the most reliable, because when they overstay then that will be in the back of their minds.

Otherwise you're just going to motivate them to work around this.

ıas in, not you rewarding them for obeying (although that works, too) but a good reason why not being on the computer at those hours is more beneficial to them than doing it.

Last edited by Geist; 11-01-2019 at 10:32 AM.
 
1 members found this post helpful.
Old 11-01-2019, 11:48 AM   #17
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: Windows 7...
Posts: 773

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Quote:
Originally Posted by BW-userx View Post
yeah but that takes out all of the fun of going to the switch box and hitting the breaker and the kid upstairs in his/her room going what just happened when all of the power goes out in there room. ....
Now that's pure evil.

Just give them their personal computer...
 
Old 11-01-2019, 10:07 PM   #18
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
Quote:
Originally Posted by Geist View Post
Make a compelling, rewardingı case for not staying on the computer all the time, that works the best and is the most reliable, because when they overstay then that will be in the back of their minds.

Otherwise you're just going to motivate them to work around this.

ıas in, not you rewarding them for obeying (although that works, too) but a good reason why not being on the computer at those hours is more beneficial to them than doing it.
+1 for pointing out that the problem has a social aspect and trying to solve it with purely technical means is futile.
 
Old 11-02-2019, 07:25 AM   #19
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I still like the idea of unplugging tactic... notwithstanding that good parenting plays a big part in this, which requires not only a good understanding of the self and the human condition. But the ability to apply it to others as well.

Jan K. saying that is pure evil.

Shows me a lot about your personality. Literal over hypothetical, and jest, along with what you conciser as pure evil, no shades od gray for extenuating circumstances?

the lesser of the two evils.

How was your childhood?

taking the wires that help bring power to the computer and ripping them out of the computer then touching the live wires to the subject in question use as a means of positive reinforcement to curtail their usage of the computer.

would you say that too is pure evil or no?

Last edited by BW-userx; 11-02-2019 at 07:32 AM.
 
Old 11-02-2019, 09:25 AM   #20
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: Windows 7...
Posts: 773

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Scrapped a (longish) reply, but a warning: unplugging may damage the computer (too).
 
1 members found this post helpful.
Old 11-02-2019, 10:03 AM   #21
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Jan K. View Post
Scrapped a (longish) reply, but a warning: unplugging may damage the computer (too).
missed word jest
a thing said or done for amusement; a joke.

or

who cares really as if....
 
Old 11-15-2019, 12:43 PM   #22
cdek
Member
 
Registered: Jul 2016
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrisretusn View Post
Try 'man porttime'
Thanks, this is exactly what I was looking for. Easy to set up and does the job.
 
Old 11-15-2019, 01:11 PM   #23
cdek
Member
 
Registered: Jul 2016
Posts: 58

Original Poster
Rep: Reputation: Disabled
On second thought, there seems to be an easy workaround for the porttime solution.

When you start the X session like this:

Code:
$ startx & disown && logout
then the X session stays active and the user is not logged out by logoutd.
 
Old 11-15-2019, 01:36 PM   #24
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
then the X session stays active and the user is not logged out by logoutd
logoutd? Hurry! Please edit the typo before yet another somethingd debate breaks out!

Please share a sanitized version of your /etc/porttime file.
 
Old 11-16-2019, 03:46 AM   #25
cdek
Member
 
Registered: Jul 2016
Posts: 58

Original Poster
Rep: Reputation: Disabled
I think it works now. Overall there were three steps:

1. create a file /etc/porttime and add a line with time restrictions
2. start logoutd at boot (add it to rc.local)
3. change the runlevel to 4

The user is now also logged out of his X session.
 
Old 11-19-2021, 04:39 AM   #26
_peter
Member
 
Registered: Sep 2014
Location: paris
Distribution: slackware
Posts: 314

Rep: Reputation: Disabled
Hello,
that is it, i finally found that 2019 thread that was helpful when implementing porttime on children's computer.

1-How to limit the time kids will graphically (and else) login on a machine ? is this it

2-How would you do it without porttime ? which seems gone for good

thanks,
 
1 members found this post helpful.
Old 11-19-2021, 05:19 AM   #27
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
Quote:
Originally Posted by _peter View Post
2-How would you do it without porttime ? which seems gone for good
Not that it's relevant or anything, but I'm pretty sure it was possible to set timers with "cron" since the seventies.
 
1 members found this post helpful.
Old 11-19-2021, 05:33 AM   #28
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Is this pam thing in slackware 15rc2 ?
Will look at it this evening !
 
1 members found this post helpful.
Old 11-19-2021, 05:44 AM   #29
_peter
Member
 
Registered: Sep 2014
Location: paris
Distribution: slackware
Posts: 314

Rep: Reputation: Disabled
yes pam_time.so is here Tonus, thanks

Code:
grep "time" /etc/pam.d/*
/etc/pam.d/system-auth:# Enable restrictions by time, specified in /etc/security/time.conf
/etc/pam.d/system-auth:account     required      pam_time.so
now crawling through the doc, need more time to understand this pam_time.so thing
 
Old 11-19-2021, 10:57 AM   #30
_peter
Member
 
Registered: Sep 2014
Location: paris
Distribution: slackware
Posts: 314

Rep: Reputation: Disabled
http://www.linux-pam.org/Linux-PAM-h...-pam_time.html
well porttime was great, pam_time.so does thing a bit differently
Quote:
Note, currently there is no daemon enforcing the end of a session. This needs to be remedied.
For the time being editing the file time.conf works well work as-is on Slackware 15 RC2.
So far no need to change files in /etc/pam.d/

Code:
/etc/security/time.conf

login;*;user;!Al1800-1700
sshd;*;user;!Al1800-1700
sddm;*;user;!Al1800-1700
kde;*;user;!Al1800-1700
the cron way may be the way indeed to auto-logout, open to suggestion.
 
  


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
LXer: How to: Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh LXer Syndicated Linux News 0 01-02-2008 12:40 PM
LXer: How to: Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh LXer Syndicated Linux News 0 01-02-2008 12:00 PM
LXer: How to: Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh LXer Syndicated Linux News 0 01-02-2008 10:00 AM
need to restrict users access to own home directory afgs_uk Linux - Security 2 11-08-2006 11:18 AM
restrict masqueraded users to access an IP, only one at a time Menestrel Linux - Networking 1 11-22-2005 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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