On Wed, Dec 12, 2001 at 08:32:36PM -0700, L. C. Robinson wrote: > On Wed, 12 Dec 2001, Rafael wrote: > > > On Wed, Dec 12, 2001 at 03:42:38PM -0700, L. C. Robinson wrote: > > > It seems to me that it would be much easier to just change > > > the username on such an account. Do: man usermod for > > > details. > > > > That won't take care of user's mailbox name and it's > > permissions nor it will change the ownership of files in user's > > home dir as far as I know. At least it won't work that way in > > all versions of Unix. > > On the contrary. The filesystem does not store user names in the > directory structure. Do "ls -ln" on your home dir, to see what > there really is. Now do "id", to see what your id numbers are. > So when you change a username, it just changes the appropriate > mapping table (/etc/passwd), which file utilities like "ls" use. > Now, if you want to change user id numbers -- that can get hairy; > but there are automated ways to do that too. And take my word > for it, that IS standard Unixen behavior. File names are stored in the directory structure. One file keeps names of files in a directory. Where else do you think they reside? Hard drive brackets? ;-) In Unix everything is treated as "files" including hardware devices. Changing user ID numbers is trivial, one command line. You need to rename the mailbox file manualy otherwise it won't belong to the right owner as far as MTA is concerned. As far as I know, tools that change the login name won't touch other things like mailboxes which is good. If you change name only in the passwd file then yes, you do not need to change the ownership of the home directory. However, you were talking about adduser command before usermod which would create a new user with different UID. In any case you'll run into some issues if files in home diretory have been customized for a particular user based on the login name and you change the name so some handwork will be needed. X windows managers setup is one of them. As always, in Unix there is more than one way to do things. > > BTW, I was reading the new Red Hat manuals about the new sysadmin > utilities last night, and I was impressed. They have some very > readable tutorials, much of which would apply to any > distribution, particularly the text mode utilities, and it is all > available online at their website for free. In particular, you > would want to look at the new Red Hat Customization Guide, which > includes the Kickstart chapters I was originally interested in, > for the recent enhancements (you saw some quotes from it in my > recent posts about kickstart). I've been using Unix and then > linux for nearly 20 years, and I'm still learning new stuff from > well written guides like that. My first Unix experience was on HP workstations in 1982. > > LCR > > -- > L. C. Robinson > reply to no_spam+munged_lcr@onewest.net.invalid -- Rafael