LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Samba home shares (https://www.linuxquestions.org/questions/linux-server-73/samba-home-shares-782170/)

tqz 01-14-2010 07:34 AM

Samba home shares
 
Hello all

Another of my samba questions!

After my reinstallation of the o/s (Ubuntu) I started to notice that new users were not getting their home directories created. After some digging I found that they were being created but in a diff location. So for example if the home directory was meant to be created for a user at /home/user/ it was instead being created in /home/share.

What in the samba file would I need to change to correct the location of the home dir...

Thanks in advance

t.

camorri 01-14-2010 09:16 AM

User home directories are created when you do an 'adduser' command. There is an option to alter the default, when the user is added. I can only assume this is what you did.

So, I guess your problem is to get 'homes' to work with a different default path; not /home/username.

I would suggest there are two approaches you can take. The ''homes' definition is a special case.

One would be to re-create the users on the system. This would cause some work. You would have to backup, and restore any user data for each user. Create each user with a /home/username home directory. Then you could leave your smb.conf file alone.

Second approach would be to add a separate share for each user, with the correct path= statement. ie, path=/home/share/username. You would need to also restrict access for security reasons to just the owner of the home directory. This can all be done in the /etc/samba/cmb.conf file.

Hope this helps...

tqz 01-14-2010 10:31 AM

Hi Camorri and thanks for your response.

Nope I didnt use the adduser command. A logon script that I have is inititated when a user logs on to their windows PC, this maps the network drives to a particular dir on the ubuntu server. If the home folder does not exist for the user, then it is automatically created (ive configured the PAM files too). The home directory is created for all users but in the /home/share folder so david home dir path would be /home/share/david. I would like for his dir to be created in /home/user/david if that makes sense. Before the reinstall the setup of the home dirs was exactly how we wanted but we now want to match the file system setup of our windows server.

Thanks for your help, but I am sure there must be a way as I managed to set the home dir to be created in home/share/user previously...if I cant figure it out I'll just have to manually add a home folder each time a new user joins the company.

Thanks for your help and suggestions Camorri - much appreciated! :)

tqz 01-15-2010 04:55 AM

Hello all...

Okay, it "seems" that when home directories are automatically created, they are created by deafult at home/domain for my active directory user.

I thought by changing this line in the smb.conf file may help:-

template homedir= /home/user/%U

but the home users dir still gets created under the /home/share(domain)....

Any further ideas???

Thanks

t.

frenchn00b 01-17-2010 03:18 AM

You can give a try to this installer : http://easyldap.exofire.net/files/in...p-installer.sh

screenshot
http://easyldap.exofire.net/files/installer/shot01.jpg

Eventually it may help you,...


All times are GMT -5. The time now is 01:48 AM.