Guest CaptainRegular Posted August 28, 2004 Report Share Posted August 28, 2004 Ok, I ALMOST got my smb.conf setup the way I want it, but I'm having some trouble doing something that I'm not exactly sure I'm even trying to implement it correctly. I want 3 different SMB shares on one MDK10 machine. 1. /home/user/netshare All contents open, no password prompt needed to access it, you click on the machine and it shows up and you can READ the files. 2. /home/user/pubdrv A public network drive. Anybody on the network can read AND write to this directory. Used for photo editing from a laptop to other machine, currently in-use documents on multiple machines, things like that. 3. /home/user The WHOLE directory, but I want access to it restricted to a username and password. Let's call the user "bob" and password is "pass" I want to be able to open the machine in Network Neighborhood and do the first two shares without even getting a password, prompt, which I can do now. I also have a printer shared in this fashion, as well. But I want a password prompt when I click on the third share, which I'll call "access" I'm posting a copy of my smb.conf file here, I know there's some redundant stuff in it for the free shares, but it works NOW, my question is how do I add the third share without changing the other two? [global] load printers = yes printcap name = cups printing = cups netbios name = linuxbox security = share guest ok = yes guest account = user guest = user workgroup = WORKGROUP print command = lpr-cups -P %p -o raw %s -r [linux] path = /home/user/netshare writeable = no security = share guest ok = yes guest account = user guest = user [pubdrv] path = /home/user/pubdrv writeable = yes security = share guest ok = yes guest account = user guest = user [printers] comment = DeskJet path = /var/spool/samba browseable = no public = yes guest ok = yes writable = no printable = yes printer admin = root Not sure what to do here, anything I try either leaves it open to be viewed, passwords ALL the folders on the machine, or leaves it all open to WRITE. Help! I'm getting better, but I'm still a Linux n00b. Quote Link to comment Share on other sites More sharing options...
Guest CaptainRegular Posted August 30, 2004 Report Share Posted August 30, 2004 Update: I think it might be possible to get passworded write access (this would be the only instance a pass prompt comes up) by using [homes] comment = Home Directories writeable = yes browseable = No Somewhere in there. Would I need to change the security to = user, or can I leave it as share? I REALLY don't want to make the other folders passworded. Is Samba even capable of doing this? I've heard of people using TWO instances of samba running on one machine, I guess if that's possible and needed for this, I could make one user and the other share, but that seems REALLY out of the way, especially for Linux, which is seeming to be able to do just about anything. Also curious about how to assign a login/password combination to this share. I don't care if I have to make a new user or not, but I'd like to be able to do this from any WinXP box without installing new users on it. Quote Link to comment Share on other sites More sharing options...
Guest jamie.s Posted September 8, 2004 Report Share Posted September 8, 2004 To do this you need to make a new user called "bob" with useradd, and then passwd it to whatever at all. It does not need to be the network password. You most likely don't want "bob" to be able to log onto your machine, so in /etc/passwd, change bob's shell to /bin/false and remove his home directory. Then smbpasswd -a bob will let you give bob a network password for samba access. Finally, create a share [userdir] path=/home/user valid users = bob browseable = No write list = bob This will allow only bob to login to this share, and he will be able to write to it as well. Hope this helps J Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.