...
The goal is to make the image available via PXE to students but not allow them to install programs and interfere with the computers' disks (installing parted, mounting disks, etc).
perhaps searching the forum for "Kiosk Mode" might provide some additional insight?
here is a random sample:
https://forum.tinycorelinux.net/index.php/topic,26764.msg172657.html#msg172657
That Kiosk approach wouldnt block student access through tty1 nor user shell, they could still use a passwordless sudo.
Hi igor.kattar
Another idea. You have 2 files in /etc/, sudoers and sudoerslocked.
sudoers is the original file, sudoerslocked is your modified version.
After ~/.profile runs:
sudo cp /etc/sudoerslocked /etc/sudoers
This idea, I guess, hit the spot, this is how I executed it (there must be a more sophisticated way)
At the end of
~/.profile I replaced the tc permissions:
...
startx
)
sudo sed -i '/^tc/d;/^root.*$/atc ALL=(ALL) ALL\ntc ALL=(ALL) NOPASSWD: \/sbin\/reboot,\/sbin\/halt,\/sbin\/poweroff' /etc/sudoers
Maintain the
/etc/sudoers file with the lines:
...
root ALL=(ALL) ALL
tc ALL=(ALL) NOPASSWD: ALL
Keeping some files and directories in
/opt/.filetool.lst file
opt
home
etc/shadow
etc/gshadow
etc/group
etc/passwd
etc/sudoers
root
Protecting that file
chown root:root /opt/.filetool.lst
And protecting the root home
chown -R root:root /root
chmod 0700 /root
Finaly backing up with:
sudo filetool.sh -b
After a reboot the user autologin normally, can only execute
reboot,
halt and
poweroff with passwordless sudo.
Nice!
Just have to remember to change the
/etc/sudoers lines back to:
...
root ALL=(ALL) ALL
tc ALL=(ALL) NOPASSWD: ALL
,
before running the
filetool.sh tool again, but this is another story.
Thank you very much
Rich and
gadget42. I guess a more protected kiosk would benefit from these ideas.
* I can't find where to mark this post is solved or where could I change the topic name but it is solved.