I had a fairly easy time getting Mandriva to restrict the login
times for my kids. I used PAM stuff, basically following this
guide:
http://blogs.techrepublic.com.com/security/?p=319
I've tried for hours to get something similar to work on Fedora
17. But, nothing works at all.
At one point I tried to automate the steps, before I found out
that this doesn't work on Fedora.
#!/bin/sh
echo "login ; * ; son|daughter ; !Al2000-0800" > text
echo "kde ; * ; son|daughter ; !Al2000-0800" >> text
echo "kdm ; * ; son|daughter ; !Al2000-0800" >> text
/bin/rm -f time.conf
cat /etc/security/time.conf text > time.conf
sudo chown root.root time.conf
sudo chmod 644 time.conf
sudo cp time.conf /etc/security/time.conf
echo "account required pam_time.so" > text
/bin/rm -f login
cat /etc/pam.d/login text > login
sudo chown root.root login
sudo chmod 644 login
sudo cp login /etc/pam.d/login
echo "account required pam_time.so" > text
/bin/rm -f kdm
cat /etc/pam.d/kdm text > kdm
sudo chown root.root kdm
sudo chmod 644 kdm
sudo cp kdm /etc/pam.d/kdm
sudo cp kdm /etc/pam.d/kdm_greet
echo "account required pam_time.so" > text
/bin/rm -f gdm-password
cat /etc/pam.d/gdm-password text > gdm-password
sudo chown root.root gdm-password
sudo chmod 644 gdm-password
sudo cp gdm-password /etc/pam.d/gdm-password
What am I doing wrong? I'm thinking that I might have the wrong
name entry into /etc/pam.d/<somefilename> I base that on my first
attempt to get my desired behavior out of Mandriva. The first
time I ended up restricting only console logins. When I found
out that I had to restrict kdm logins, then I got it to work.
After a lot of trial and error with filename options on Fedora
I'm still no further than I was before.
Does anyone have a cookbook for how to get this to work on Fedora 17?
Thanks....
--
Kevin