[Samba] Problem moving Samba shares to newly installed drive

Daniel damn at fangartists.com
Tue Dec 14 23:01:50 GMT 2004


I have been working on a RedHat machine that is a PDC for a Windows network
running XP clients.

The system has the following shares defined in /etc/samba/smb.conf:

/public (FYI /public is a symbolic link to /home/public)

They are all on the /home partition which is on the main system drive, which
is full.

I have installed a second drive, made an ext2 file system, and mounted the
drive as 1 large partition called /share.

I then copied all the data from the /home partition to the /share drive via
( cp -R /home/* /share ).

I then edited the paths for the shares listed above in /etc/samba/smb.conf,
changing any references to /home to /share.  I deleted the /public symbolic
link, and changed the share path for that share to /share/public

Restarting Samba resulted in the client machines (all running XP) logging in
and receiving an error that their profiles could not be found.

I quickly reverted everything back to the way it was to make sure all was
well, which it was.

I then tried just changing the location of the /public share, by changing
the path in smb.conf from /public to /share/public, expecting that the users
would be able to login, their home directories would be full, but the
'public' share would be on the new large drive at least.

But doing just this also resulted in them receiving the error that their
roaming profile could not be located.

I had also tried not mounting the /home partition on the primary drive, and
mounting the new drive ( /dev/sdb ) as /home expecting this would work and
would result in me not needing to edit anything in /etc/samba/smb.conf -
which was also wrong - I got the same results, profiles could not be found.

So I reverted everything back to the old drive, but created a new share in
smb.conf called 'new' and set its path to /share (the new drive) and this
worked, it was happy to leave existing shares in the original location and
have a new share in the new location.

This at least gave the people a new spot to put their data, but was not what
they were after.

My questions are:

1)  The first thing I noticed is that when I copied everything over from the
old drive to the new, all the permissions, ownership & group information was
lost.  Everything was owned by root.  Manually changing the permissions for
the /share/profile folder to make them match the original made no
difference.  What did I do wrong ( cp -R /home/* /share ) that did not copy
the permissions / ownership info over?

2)  Why would changing the location of the 'public' share result in people
not being able to login, when their profiles and the 'netlogon' share were
still defined as being on the old drive?

3)  Searching for smb.conf resulted in several copies of it floating around
the place, most of them in folders that included 'example' in the path.  Is
it possible that Samba could be looking at multiple copies of this?  Where
is Samba told which smb.conf to look at?

4)  If you can spot where I have errored, please point it out.  If I can
provide more info, please let me know, I've tried to be as precise as

Thanks in advance.


More information about the samba mailing list