Robert Connolly wrote: > On Sunday March 25 2007 22:30, Dan Nicholson wrote: >> Also, I'm wondering if there would be problems running scripts, etc., >> when HOME=/dev/null. The dummy user we create for coreutils is given >> /root as it's home directory. Robert, do you see any issues running >> the testsuites as nobody? > > I used this for passwd: > nobody:x:65534:65534:Unprivileged User:/nonexistent:/sbin/nologin > > And this for group: > nogroup:x:65533: > nobody:x:65534:
The use of 65534 for a uid or gid is not a good idea. It comes from old time usage in nfs and nowhere else. *If* nfs does not find a nobody user, it defaults to -2. Since the uid/gid are 16 bit numbers, this equates to 65534. There are two things wrong with this. First it makes the /var/log/wtmp look very large when viewing with ls -l. du /var/log/wtmp does show the correct disk usage though as it is a sparse file but the ls -l can confuse users that don't know its a sparse file (or even what a sparse file is). If the file system does not support sparse files, the file really is huge. I think most modern distros use 99 for nobody as we do. I know RedHat does at least as far back as RH9. They do have a nfsnobody user, but that is merely for an ls -l display if accessing a disk with very old practices. Secondly, if a user is able to log in somehow and the home directory does not exist, it defaults to /. You see this if a home directory is on a separate partition that is not mounted. This is why root's home directory is always /root and not /home/root. I highly recommend using /dev/null instead of /nonexistent. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
