LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba File/Folder sharing question (https://www.linuxquestions.org/questions/linux-networking-3/samba-file-folder-sharing-question-739992/)

henk001 07-14-2009 09:40 AM

Samba File/Folder sharing question
 
Hi,
I am running OpenSuse 11. It runs Apache webserver and Samba for filesharing. I am also running webmin. Everything works 100%. I have 2 shared folders that can be accessed by everyone. My question is how can I log in to the shared folder from a windows machine when I set the permissions for only a certain user to log in. My system hostname is Linux.site and my user is henk. I am not sure how I need to log in that way. Should the username be Linux.site\henk ... I have a bit of difficulty with this. I am quite new to Linux though.
Many thanks

Henk

jschiwal 07-14-2009 09:43 PM

You will need to post the Global section of smb.conf and the share definition. If you have "map bad user = guest" and "guest ok = yes" in the share definition, then it doesn't matter what credentials you enter.

The Linux equivalent of the window's user "guest" is the Linux user "nobody". A globally writable share should be created owned by nobody, with rwx permissions, and the sticky bit should be set.

Code:

sudo mkdir /srv/samba/sharename
sudo chown nobody.nobody /srv/samba/sharename
sudo chmod a=rwxt /srv/samba/sharename

If you use the default "Security = user", and you log in as user who has credentials in samba & linux, then the ownership of files shared will be of that user. If you aren't a Linux/Samba user, then the file created will be owned by "nobody". The sticky bit on the directory prevents one user from deleting a file owned by another user.

If you have a user on Linux, you use the `smbpasswd' program to create a samba user with the same username and passwd.
This assumes that your server uses the 'smbpasswd' file for storing credentials. There are other methods, such as using a different backend, and using Samba as a domain controller. But it seems you are using pretty much the defaults, and I assumed you aren't running a domain controller (which XP home can't join anyway).


All times are GMT -5. The time now is 03:33 PM.