LinuxQuestions.org
Help answer threads with 0 replies.
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 11-11-2010, 11:21 AM   #1
gdeeble
LQ Newbie
 
Registered: Oct 2010
Location: NRV, VA
Posts: 20

Rep: Reputation: 0
Unable to Mount Samba Share


So I've began to work on getting my access control, set up properly on my server, and want to create a "my documents" folder for each user I add. I do not want it being part of the home directory and have read everything and still can't seem to get it to work. I've got a second drive that is mounted at /private on my server, with a folder that is underlying on it call users and groups. Then from there is has the exact unix username that I set up in Users and Groups. Ex. /private/user/gary . With Samba, I added the following code:

Code:
[My Documents]
	guest ok = no
	comment = %u's Documents
	valid users = $S
	writeable = yes
	path = /private/user/%u
I've tried using %u,%U,%S, and the normal username and of all of them, it will only work with the username. I've even used force user. added root to the valid users list and it still gives me access denied or the multiple connections to a single share with multiple user names prohibited but nothing is mounted on this share. On Webmin, it doesn't show any connections to the share. I'm rather at a stumped state in which is frustrating me, because I want to have this so when I go from my desktop to my laptop I have "My Documents" On either unit. Security on the server is set to User because I've searched to see if I can't find a way to make shares visible by a guest but read only to them and when I access them from my log in to make it read write using the "Share" option. If anyone has some suggestions I've got an open ear to hearing what they say and trying anything. Anything is appreciated. Thanks for the time. -Gary
 
Old 11-11-2010, 02:02 PM   #2
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Rep: Reputation: 32
What do you have in the Global section?

I've found that some entries that seem to be necessary are

workgroup = whatever the name of your windows domain
security = DOMAIN
domain master = NO
 
Old 11-11-2010, 03:59 PM   #3
gdeeble
LQ Newbie
 
Registered: Oct 2010
Location: NRV, VA
Posts: 20

Original Poster
Rep: Reputation: 0
This actually just a home server. I don't know much about domains and servers that way. I just want it to be a little back end web-server and file server, and then maybe in the future a local email server. Is it not possible to do as just a little workgroup server?
 
Old 11-11-2010, 05:10 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,810

Rep: Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334
AFAIK [homes] is the only special share that will automatically create multiple shares based on username.
 
Old 11-11-2010, 06:59 PM   #5
gdeeble
LQ Newbie
 
Registered: Oct 2010
Location: NRV, VA
Posts: 20

Original Poster
Rep: Reputation: 0
From my reading though it says that you should be able to use I want to say %U, %u, or %S which should dictate the directory name and the user all dynamically. The only problem I'm having is it dictating the user that should connect to it. The path works fine with a dynamic path and static user but not a dynamic user. I even have SE-Linux Disabled to ensure it's not that causing issues.
 
Old 11-11-2010, 11:53 PM   #6
gdeeble
LQ Newbie
 
Registered: Oct 2010
Location: NRV, VA
Posts: 20

Original Poster
Rep: Reputation: 0
Also the globals are as follows:

Code:
[global]
	log file = /Share/Log/smbd.%m.rtf
	name resolve order = hosts wins bcast
	announce version = 4.9
	socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
	username map = /etc/samba/smbusers
	null passwords = no
	encrypt passwords = yes
	passdb backend = tdbsam
	wins support = yes
	netbios name = MD
	cups options = raw
	server string = MD Server
	printing = CUPS
	local master = yes
	workgroup = mshome
	os level = 70
	printcap name = CUPS
	security = user
	syslog = 1
	preferred master = yes
	log level = 3
Yes I know the Log Level is rather high but that's so I can detect other issues that I have. Such as the bogging down and discos for no good reason. All suggestions are accepted to try out though. I mean if the security being domain would help then I could try that but I really don't understand domains and such. -Gary
 
Old 11-12-2010, 04:06 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,810

Rep: Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334
Code:
[My Documents]
	guest ok = no
	comment = %u's Documents
	writeable = yes
	path = /private/user/%u
Ok, so I finally had some time to play around and if you delete valid users it appears to work. I am using samba version 3.0.33 and selinux disabled. Make sure the permissions for each directory i.e. /private/user/gary etc are configured correctly and that you have added a samba password for each user.
 
1 members found this post helpful.
Old 11-12-2010, 08:06 AM   #8
gdeeble
LQ Newbie
 
Registered: Oct 2010
Location: NRV, VA
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you so much, I knew I was probably being a moron with setting this up and it was something very easy being missed. The permissions should be 700 for the directories, to ensure only the user can read and write to them just like the home directory right? That's what I've set it to and just want to make sure so to avoid any issues. After that being fixed it's going to be ensuring logins work right. Should I be able to put just the username and password or should it be MD\username for the username and password to work? -Gary
 
Old 11-12-2010, 11:10 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,810

Rep: Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334Reputation: 6334
Just username and password.
 
Old 11-12-2010, 04:49 PM   #10
gdeeble
LQ Newbie
 
Registered: Oct 2010
Location: NRV, VA
Posts: 20

Original Poster
Rep: Reputation: 0
Awesome. It works. Now to figure out how the samba config client in centos stores the usernames, because between that and Webmin, I have different users where I've added some in Webmin and some in samba config. It would be nice if it all was plug and play. I mean from what I read it should be but maybe I am missing something. Time to hunt for that answer. LoL -Gary
 
  


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
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
Unable to mount samba share, dBus error ayongying Linux - Newbie 1 04-14-2010 09:12 PM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 11:28 AM
Unable to add Samba share mount point with Mandriva 2008.1 Clived Mandriva 6 05-19-2008 03:31 PM
show the samba share but can't mount the share badall Linux - Server 3 05-30-2007 04:24 AM

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

All times are GMT -5. The time now is 04:09 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
Open Source Consulting | Domain Registration