LinuxQuestions.org
Visit Jeremy's Blog.
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 02-26-2009, 01:52 AM   #1
peddip
Member
 
Registered: Dec 2008
Posts: 51

Rep: Reputation: 16
Sharing user home directories using samba


Hi There,

How can i share my home directories using samba? I want each and every user to access only their home directories and they shouldn't access others directories.

They should be able to map their home directories in windows XP clients.
 
Old 02-26-2009, 02:40 AM   #2
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 773
Blog Entries: 6

Rep: Reputation: 75
1) How can i share my home directories using samba?
/home/urself < share to all

2)I want each and every user to access only their home directories and they shouldn't access others directories.

/home/user <- no share to user2 or 3 etc etc

which one u want ?
 
Old 02-26-2009, 03:34 AM   #3
rizwanrafique
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, openSUSE, CentOS
Posts: 147

Rep: Reputation: 19
Part of smb.conf file that does this.

Code:
[homes]
   comment = Home Directories
   browseable = no

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
   writable = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.   
   create mask = 0775

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0775

# Restrict access to home directories
# to the one of the authenticated user
# This might need tweaking when using external authentication schemes
   valid users = %S
In windows XP access this machine normally with \\<smb_server>\<username> or just \\<smb_server\ and provide password and it'll list the appropriate user directory.

Last edited by rizwanrafique; 02-26-2009 at 03:35 AM. Reason: left some stuff
 
Old 02-26-2009, 04:00 AM   #4
peddip
Member
 
Registered: Dec 2008
Posts: 51

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by routers View Post
1) How can i share my home directories using samba?
/home/urself < share to all

2)I want each and every user to access only their home directories and they shouldn't access others directories.

/home/user <- no share to user2 or 3 etc etc

which one u want ?
I want to share all home directories under my linux server so that users can map their home directories in windows clients.

/home/user <- no share or access to user2 or 3 etc etc
 
Old 02-26-2009, 04:09 AM   #5
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 773
Blog Entries: 6

Rep: Reputation: 75
follow config smb.conf given by rizwanrafique
and add samba user with smbpasswd -a username

then win user can map to thier drive
 
Old 02-26-2009, 04:11 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
You can also use a profile share:
Code:
[profiles]                                                                
        comment = Network Profiles Service                                
        path = %H                                                         
        read only = No                                                    
        store dos attributes = Yes
        create mask = 0600
        directory mask = 0700
        hosts allow = 192.168.1.0/255.255.255.0
Add each user as a linux user (which you did if they have home directories) and run smbpasswd to create entries in the smbpasswd file. There are other password backends besides smbpasswd. Smbpasswd is the default. If you use it you probably want to use the "Security = Users" option, unless your samba server is used as an NT styled domain controller.
 
Old 02-26-2009, 04:51 AM   #7
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 773
Blog Entries: 6

Rep: Reputation: 75
this is my smb.conf as it, i dont
have others funny funny but its working fine

Code:
[global]
   log file = /var/log/samba-log.%m
   lock directory = /var/lock/samba
   share modes = yes

[homes]
   comment = Home Directories
   browseable = no
   read only = no
   create mode = 0750
every user added only can play arround on his home/dir
 
Old 02-26-2009, 06:18 AM   #8
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
I should mention that you need to create the home directories so that the group or other permissions don't allow sharing by default. For example, if the group ownership is "users" you might want to change that. This is what openSuSE uses by default.
 
Old 02-26-2009, 06:52 AM   #9
peddip
Member
 
Registered: Dec 2008
Posts: 51

Original Poster
Rep: Reputation: 16
Thanks to all

Will check the suggestions and update!!!!
Hi All,

I'm back with new issues,hope some one can help me here.

When i try to map network samba share as network drive my windows system keeps on asking for login details even i provide the correct on and it never connects.Can any one suggest what could be the issue and how to fix it...???

Last edited by peddip; 03-19-2009 at 06:51 AM.
 
Old 03-19-2009, 06:58 AM   #10
peddip
Member
 
Registered: Dec 2008
Posts: 51

Original Poster
Rep: Reputation: 16
I'm back with new issues,hope some one can help me here.

When i try to map network samba share as network drive my windows system keeps on asking for login details even i provide the correct on and it never connects.Can any one suggest what could be the issue and how to fix it...???
 
Old 03-19-2009, 08:12 AM   #11
Au_Squirrel
Member
 
Registered: Nov 2005
Location: Brisbane AU
Distribution: FC16
Posts: 51

Rep: Reputation: 15
Try the samba troubleshooting guide checklist. http://www.samba.org/samba/docs/man/...diagnosis.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Samba sharing guest and user(homes) directories monkeyfoo Linux - Networking 4 05-02-2006 03:51 PM
Samba =sharing home directories memba4life Linux - Networking 2 02-17-2006 04:10 PM
Sharing directories outside of /home... AudioMechanic Linux - Networking 1 03-16-2005 09:18 PM
sharing directories not in $HOME GTBlackwell Linux - Networking 2 10-23-2003 07:21 PM
File Sharing Between Home Directories scottpioso Linux - General 5 03-10-2003 01:14 PM


All times are GMT -5. The time now is 05:12 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration