On Monday 05 March 2007 01:43, Bruce Dubbs wrote: > Matthew Burgess wrote: > > Now, we can > > either install a 'users' group as GID 1000, or we can change the default > > in /etc/default/useradd to one of the GIDs in /etc/passwd. Personally, > > I'd prefer the former, as I can't see a suitable default group in > > /etc/passwd. > > I'd prefer a default of 200 or 500. No real reason, but 1000 seems too > big to me.
Well, Kubuntu uses gid 100 for their 'users' group, so that seems a sane enough default. > My *real* preference would be for the system to automatically make a new > group with the same name as the user if -g is not specified and use > that. I think that's how RedHat does it. Kubuntu does this too. Unfortunately, it doesn't look like it'd be trivial enough to get this functionality in to LFS. This is from their almost entirely commented out /etc/default/useradd file: # Please be aware that Debian's adduser defaults to "user groups" # which means that one group is created for each user # There is no way to achieve this with useradd which must remains a low # level utility # GROUP=100 If I get some time I'll figure out just how issuing `useradd' manages to invoke `adduser' behaviour though! > I have no problem with LFS installing a mail group using a vule of 34. > That would require a minor adjustment to BLFS, but it wouldn't be a big > problem. Great. > My bigger problem is why is shadow's useradd creating a user mailbox at > all. It would seem to me that assumptions are being made that are not > valid for most systems. My "mailbox" is in ~/.mozilla. It's because of the 'CREATE_MAIL_SPOOL=yes' in /etc/default/useradd. I can't see a way of changing this via the command line, unlike the default home directory and gid (see below). So, I think the following will have to do: sed -i 's/yes/no/' /etc/default/useradd > > the second error message is caused because '/home/users' is > > specified in /etc/default/useradd but we don't create that directory. > > Again, this seems that assumptions are being made that are not > warranted. They may have been at one time, but what goes in /home > besides users? Make the default /home. OK, the default gid and home directory can be changed via the command line: useradd -D -g 100 -b /home So, I'm thinking now of adding two new groups to LFS - mail=34 and users=100. Then, we'll use the `useradd -D' and `sed' commands above to change shadow's defaults. I'll leave this for a couple of days for further comments, but all going well Shadow will start behaving itself shortly after that :-) Matt. -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page