如何在chroot中允许passwd?
我有一个多用户服务器,它把用户的一个子集放在一个chroot中。 我想允许所有用户调用passwd来更改他们各自的密码。 我能想到的其他任何事情都是矫枉过正,或者可能会危及系统安全。 我用makejail使用以下configuration来构build我的chroot。 chroot="/var/chroot/sshd" cleanJailFirst=1 # these are binds to the actual location, hence, we don't want makejail to be tinkering with those. preserve=["/home","/etc/passwd","/etc/group","/srv"] testCommandsInsideJail=["bash","sh","ls","pwd","stat","whoami","svnserve -t","locale","localedef","man ssh","man scp","cat","nano","vim","ssh","scp","passwd"] testCommandsOutsideJail=[] packages=["coreutils"] # speed up things a bit sleepAfterStartCommand=0.8 sleepAfterTest=0.8 正如你所看到的,在testCommandsInsideJail ,我列出了passwd ,但是如果我作为testuserlogin(谁在chroot里面),我得到: $ passwd Changing password for test. (current) UNIX password: passwd: Authentication token manipulation […]