如何在启动或关闭时删除所有网络用户?


3

我希望在每个学生每天登录计算机之前运行此脚本。

#!/bin/sh

mv /Users/admin /admin

wait $pid

mv /Users/Shared /Shared

wait $pid

rm -rf /Users/*

wait $pid

mv /admin /Users/admin

wait $pid

mv /Shared /Users/Shared

wait $pid

我想保留“管理员”和“共享”并删除其余部分。我不想在学生使用电脑时这样做。启动或关闭是最好的主意。我能自动化吗?


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.