Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


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

Rep: Reputation: 0
Samba File/Folder sharing question

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 and my user is henk. I am not sure how I need to log in that way. Should the username be\henk ... I have a bit of difficulty with this. I am quite new to Linux though.
Many thanks

Old 07-14-2009, 09:43 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

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

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).


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
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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration