[Samba] Corrupted userid in mail folders - Crisis

Roland Giesler roland at giesler.za.net
Tue Sep 21 16:20:04 GMT 2004


Christoph Scheeder asked 
> 
> Hi,
> 1.) is this a new installation
No, it was Mandrake 8.2 box, but was recently upgraded to Mandrake 10.

> 2.) if not what was changed when the failure first occured?
Thing were running fine, at least that's what it appeared like.  Then
sporadically people started getting authentication error when logging into
their IMAP mailboxes.  Next the deputy principal reported that she had
received other people's mail.  So I ran the following script to reset all
the folders:

#!/bin/bash

export IFS=:

echo "Auto-creating home directories for windows domain users"

getent passwd|grep ":10[0-9][0-9][0-9]"|while read USER FLAG USERUID USERGID
USER_LONG USERHOME USERSHELL; do
        if [ -e $USERHOME ]; then
                echo "Setting ownership of existing $USERHOME"
                chown -R $USERUID.$USERGID $USERHOME
        else
                echo "Creating $USERHOME for $USER with $USERUID/$USERGID"
                mkdir $USERHOME;
                cp -a /etc/skel/* $USERHOME
                chown -R $USERUID.$USERGID $USERHOME
        fi
done;

After this the all appeared to be fine.

But then a few hours later thing got even worse.  Even squid's cache file
got wrong ownership and stopped squid from spawning child processes.

Eventually the machine hangs and I cannot see why.  Btw is the a log where
hanging processes can be logged?  Or could I enable logging to syslog?

I restarted the machine about an hour ago and all folders seem fine now

> 3.) please could you verify if the numeric user/group id's of 
> the files in question change? use
> 
> ls -ln
> 
> on the files for this check.
> I would bet the numeric user/group id's don't change even when the 
> usernames mapped to them change.
> please verify and post the result back to me.
I'm checking that now.  As soon as I have an id that's changed, I test and
post the result.

Roland



More information about the samba mailing list