Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-11-2010, 11:21 AM
|
#1
|
LQ Newbie
Registered: Oct 2010
Location: NRV, VA
Posts: 20
Rep:
|
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
|
|
|
11-11-2010, 02:02 PM
|
#2
|
Member
Registered: Sep 2003
Location: Laurel MD
Posts: 296
Rep:
|
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
|
|
|
11-11-2010, 03:59 PM
|
#3
|
LQ Newbie
Registered: Oct 2010
Location: NRV, VA
Posts: 20
Original Poster
Rep:
|
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?
|
|
|
11-11-2010, 05:10 PM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,810
|
AFAIK [homes] is the only special share that will automatically create multiple shares based on username.
|
|
|
11-11-2010, 06:59 PM
|
#5
|
LQ Newbie
Registered: Oct 2010
Location: NRV, VA
Posts: 20
Original Poster
Rep:
|
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.
|
|
|
11-11-2010, 11:53 PM
|
#6
|
LQ Newbie
Registered: Oct 2010
Location: NRV, VA
Posts: 20
Original Poster
Rep:
|
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
|
|
|
11-12-2010, 04:06 AM
|
#7
|
Moderator
Registered: Aug 2002
Posts: 26,810
|
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.
|
11-12-2010, 08:06 AM
|
#8
|
LQ Newbie
Registered: Oct 2010
Location: NRV, VA
Posts: 20
Original Poster
Rep:
|
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
|
|
|
11-12-2010, 11:10 AM
|
#9
|
Moderator
Registered: Aug 2002
Posts: 26,810
|
Just username and password.
|
|
|
11-12-2010, 04:49 PM
|
#10
|
LQ Newbie
Registered: Oct 2010
Location: NRV, VA
Posts: 20
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 04:09 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|