Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am still relatively new to Samba myself, however, I am wondering if your entry: "read list" is causing issues. Blurb from "man smb.conf" says:
########## start ###########
read list (S)
This is a list of users that are given read-only access to a service. If the connecting user
is in this list then they will not be given write access, no matter what the read only option
is set to. The list can include group names using the syntax described in the invalid users
Default: read list =
Example: read list = mary, @students
########## end ##############
I read that as saying that even though you have "samba" user set to writable that the fact he is also listed in "read list" means they wont get write access.
I know I didn't use that value at all when I set up my, working, test boxes.
Is the samba user a system user. If so, don't login as that user, and create a new user and group instead.
Generally, the directory you are sharing will be owned by the user and group owner that matches the smb.conf values. Also set the sticky bit on the directory itself if more than one user has write permissions.
I can't tell if you are trying to create an anonymous share (which usually uses the guest user) or if you happened to give yourself the username of samba.
Look for the "Samba 3 by Example" book supplied either by your samba or samba-doc package. You may be trying to implement a share similar to their no-frills server examples in chapter 1.
That said, I did create a /home/samba directory on my laptop, and created this share:
path = /home/samba
read only = No
guest ok = Yes
available = Yes
I restarted the samba services and was able to create a file on the share from another computer. The /home/samba directory is owned by root, so I didn't follow the Samba 3 by Example sample config in chapter 2. But the share is named samba which I think you wanted, and is owned by root which s the same as your example.
After making a change, I used ssh to connect to another host (delllap) where I ran konqueror to test the new samba share. I was to lazy to walk over to the other computer! This technique allows you to experiment with different smb.conf configurations.
The samba user is a system user, I've added it to the smbusers and created a password with smbpasswd, the server accepts this login when I view a share.
I'm not trying to create anonymous acces, I just named the test user samba.
Also I tried your share configuration and still no change. (btw, yes, I restarted the service)
One thing I forgot to mention, if I try to delete a file, it won't give an error message, but the file will be there when I refresh. On the other hand when I put readonly = Yes it gives me an error when trying to delete. So this makes me think that samba creates the share writeable, but something goes wrong somewhere else.
I'll try the book also, but since it accepts the delete, I don't think the smb.conf is the problem.
I still don't get the purpose of the samba share or what you are trying to accomplish. Who uses the share? How many users will use this server? I noticed that you are using tdbsam as a backend database instead of smbpasswd. But you seem to be using /etc/passwd and /etc/shadow for authentication of the samba user. Usually, tdbsam is used when you have at least 50 users and don't want to have to replicate the users & passwords among the different hosts. It doesn't seem that you have set up anything like that so maybe you want to use smbpasswd instead.
Are your clients all on windows? If so it would be a good idea
to set `security = user' on [GLOBAL] That is, if you want them
to have an smb password set on server. You can also set it to
share and they won't be asked for login
Take a look at the following smb.conf and compare with yours.
workgroup = workgroup
netbios name = file-server
server string = Linux Samba Server
encrypt passwords = yes
security = share
local master = no
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
read only = yes
browseable = no
writable = no
comment = All windows data sotrage
path = /home/west/win
public = yes
read only = no
browseble = yes
writable = yes
write list = west
create mask = 755
See if you are missing something. This configuration works
well for windows clients on my LAN.
If you have any linux clients please post the way you are mounting.
All right, if I understand what you posted you are sharing
Anyways. This is what you'll need.
|User |To access and write to: |Must have |
|Windows |Its own home directory |/home/jondoe/sharepoint |
|User |on samba server |with at lease |
|Login: |ie. /home/jondoe/ |u+rw- permision. Or better |
| | |yet u+rwx |
|U: jondoe |Needs login: | |
|P: alive |U: jondoe |smbpasswd identical to |
| |P: alive |windows login |
| | |ie. U: jondoe |
| | | P: alive |
| | | |
|Windows |Common home directory on |/home/admin/shares/userdocs |
|User |samba server, used for |with at lease: |
|Login: |multiple sharepoint |uo+rw- permision. Or better|
| | |yet uo+rwx |
|U: jondoe |ie. /home/admin/shares/ | |
|P: alive | |smbpasswd: not necessary |
| | Login: | |
| | | |
| | U: admin | |
| | P: alluse | |
Important note* If you are mounting existing directories you'll have
to chmod -R accordingly. eg. chmod -R uo+rw /home/admin/shares/userdocs
There is another configuration using groups, just use the
first configuration using: ug+rwx and users can access and
write to each other home shares as long as they are in the
same group in the samba server. Also note that each user
needs to have the exact same username and password for
samba credentials - smbpasswd.
The second configuration is not safe, but its the best I
can do for windows logins that has spaces in the username
and don't want to change it. You can always suggest an
alias or migrate the user to a one word username, its the
users choice if (s)he is the boss.
I gave you the most common scenarios, so you could adapt from those.
But so far you haven't tell us what you have done, haven't posted
any error messages, and the little configuration you have shown seems
very obscure for me, or anyone here to figure out your problem. We
don't know if you want to share a single folder to everyone or you
want to create individuals. Its very hard for that second scenario
in the table to fail.
While I was writing it, I did:
-Create a test user on Win XP.
-Create a shared folder on an existing user on samba server
---chmod'ed it to uo+rwx
-Added the share folder to smb.conf
*Note, smbpasswd for the test user isn't even necessary in