There are some users on my system who don’t know anything about the
PC, so they try to explore it for just learning purpose. My intention
is that I can give them a separate account by which they can explore
the system without accidently removing or changing any file on the
system, but I as another user should be able to do any changes on the
system.
这是Unix / Linux系统正常工作的大致方式.用户只有权删除或修改(a)他拥有的文件或目录,或者(b)他所在的组具有写入权限的文件或目录.
系统管理员(就是你,我猜)可以控制一切.因此,只需确保这些新用户属于他们自己的群组.
Unix被设计成一个多用户系统.因此,从一开始,Unix / Linux只为普通用户提供有限的权限.通常,普通用户不会弄乱系统文件.只有名为root的系统管理员才能这样做.
有些系统允许普通用户通过运行sudo获得root的功能.确保/ etc / sudoers文件没有为它们提供该功能.
如果您想要严厉,请不要让他们拥有所有权,即使是主目录.他们仍然拥有对/ tmp和/ var / tmp的写权限,但这不应该造成麻烦,除非他们创建的文件太大以至于他们填满了分区.