admin utils, fetchmail, upgrades, and security (was: Re: A Bunch of Questions)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 14, 2001 at 06:24:42AM -0700, L. C. Robinson wrote:
> First of all, if you reply to this thread, please fork the 
> subject line... <grin>
> 
> On Thu, 13 Dec 2001, Brent Harding wrote:
> 
> > The one thing rh does do is offer to fix up the permissions
> > when you name change, move the home directory, I believe.
> 
> If you are talking about using usermod only to change a user
> name, then no, it does not offer to fix up permissions or
> ownership, for the simple reason that it is not necessary, nor is
> it necessary to move (ie, rename) the home directory (but with
> the right options it can do that last, and a bunch of other
> things).  Also, usermod is not Red Hat specific.

Nowhere do I see usermod command change the mailbox name. At least man 
pages for RedHat7.2, Solaris 5.7, Solaris 8 do not mention that in any 
way. I have not used usermod for some time since my environment requires 
changes to NIS and many servers across the net which usermod won't take 
care of.

> 
> There seems to be some confusion about how these things work,
> which has led to some unnecessarily complicated instructions
> about how to do it.  The adduser command should not be necessary
> at all when merely changing a username: usermod will suffice, all

usermod is not a necessary command at all. VI is all I need to take care 
of that issue and is much faster than trying to figure out what to 
pass to usermod command to get the expected result. usermod command 
however is useful in scripts to automate things in case you need that 
functionality.

I used to be in team of "movers" at Sun some time back where we moved
people's data and email between the servers across the network. As far as
I remember the procedure we used was simple, vi, rsync, and tar were the
most common tools used in most cases. Renaming a user was sometimes
necessary if the same username existed in another subdomain but that 
required to change the UID as well not to mention changing file ownership 
for their home.

> by itself, with NO other commands.  In particular, usermod is
> smart enough to change the name of the users mailbox when using
> the -l option, though this behavior is not documented in the man
> page.  The permissions and ownership (UID,GID _numbers_) can and
> should remain the same.

Correct. The man page doesn't say that.

........ deleted

> > >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.
> 
> Perhaps I overlooked some ambiguity in my explanation (maybe I
> was more tired than I thought).  My apologies. The reference I
> made to user names was to ownership, not filenames, which should
> have been obvious by the context (what do you think the -n option
> to ls does)?  Excessively rude replies can be embarrassing!
> You are, of course, quite right about filenames: I never said
> otherwise.
> 
> > >Changing user ID numbers is trivial, one command line.
> 
> Maybe to a power user, who knows how to pick just the right
> command or utility, in just the right situation.  But that
> command might have to change the ownership id numbers on perhaps
> hundreds of files scattered all over the filesystem.  Remember,
> we are trying to tutor some relatively new users.
> 
> > >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.  
> 
> But, as we have seen, usermod is smart enough to rename it for
> you.  Make a dummy user account and try it.

Will try, as far as I can remember some versions of that command did not
do that in the past so that's an improvement. Unfortunately it's not 
docummented at all.

.....
> > >If you change name only in the passwd file then yes, you do
> > >not need to change the ownership of the home directory.
> 
> So apparently, you do understand the filesystem structure,
> relative to permissions and ownership.  Do you see how your
> previous posts could have been confusing to newbies?

It all started from the wrong foot IMO, solving some kind of email 
related problem with renaming the login and we ended up wandering around.

... snip

> *** shifting subject focus:
> 
> > >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.
> 
> Do you mean, for instance, if you have in .fetchmailrc:
> 

> server mailhost.myisp.com proto pop3 username director there is jondo
> here password passxxxxx

I believe there are other things that will cause problems. KDE and 
perhaps Gnome for example are very picky about where they reside and who's 
using them. I know there is a problem if you manualy change the IP from 
inside KDE because some of the authentication depends on it. It's like 
pulling the rug under somebody's feet.

Another issue is SSH. That too depends on login name. So changing user's 
login name is not that simple anymore. It's better to be familiar with vi 
than usermod.

> that you might need to change your local user name in there, too?
> A good reminder.
> 
> <snip>
> 
> 
> LCR
> 
> -- 
> L. C. Robinson
> reply to no_spam+munged_lcr@onewest.net.invalid
> 
> People buy MicroShaft for compatibility, but get incompatibility and
> instability instead.  This is award winning "innovation".  Find
> out how MS holds your data hostage with "The *Lens*"; see
> "CyberSnare" at http://www.netaction.org/msoft/cybersnare.html

Thanks for clarifying things.

-- 
Rafael





[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]