LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-14-2009, 09:40 AM   #1
henk001
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
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
 
Old 07-14-2009, 09:43 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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).
 
  


Reply



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: permission for sharing public and private folder zamri Linux - Software 16 02-02-2011 07:49 AM
Why Samba Server is sharing my Home folder? baig Linux - Security 2 12-18-2008 07:59 PM
File/Folder Sharing in unix for different users sumanthls Linux - Newbie 1 09-10-2008 11:57 PM
(re)sharing an nfs-mounted folder with samba rtspitz Linux - Networking 1 02-13-2005 01:36 PM
Question: Linux + Win file sharing with Samba yurlittlepony Linux - Networking 2 08-29-2003 11:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:21 PM.

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