LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-14-2010, 07:34 AM   #1
tqz
Member
 
Registered: Jan 2008
Posts: 67

Rep: Reputation: 15
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.
 
Old 01-14-2010, 09:16 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
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...
 
Old 01-14-2010, 10:31 AM   #3
tqz
Member
 
Registered: Jan 2008
Posts: 67

Original Poster
Rep: Reputation: 15
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!
 
Old 01-15-2010, 04:55 AM   #4
tqz
Member
 
Registered: Jan 2008
Posts: 67

Original Poster
Rep: Reputation: 15
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.
 
Old 01-17-2010, 03:18 AM   #5
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
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,...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
win xp home edition and samba home shares scheidel21 Linux - Software 8 10-09-2008 12:47 AM
Samba shares all home directories arapidsfan Linux - Server 6 10-05-2006 05:42 PM
How To Limit Samba Shares In /Home Harpo Linux - Software 1 03-29-2006 06:50 AM
Apache subdomains like Samba home-shares toffi22 Linux - Software 1 01-30-2005 07:16 PM
samba home directory shares walewis Linux - Software 8 09-28-2003 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration