LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [b] Samba share folder problem (http://www.linuxquestions.org/questions/linux-newbie-8/%5Bb%5D-samba-share-folder-problem-892732/)

togitoon 07-20-2011 08:54 AM

[b] Samba share folder problem
 
Hi, i configured a samba server. And add a user. Then when i want to test my system from another windows computer, I can see the folder but i cant reach it.There is the log file

[2011/07/20 16:45:43, 0] smbd/password.c:authorise_login(846)
authorise_login: rejected invalid user nobody
[2011/07/20 16:45:43, 0] smbd/password.c:authorise_login(846)
authorise_login: rejected invalid user nobody
[2011/07/20 16:45:43, 0] smbd/password.c:authorise_login(846)
authorise_login: rejected invalid user nobody
[2011/07/20 16:45:49, 0] smbd/password.c:authorise_login(846)
authorise_login: rejected invalid user nobody
[2011/07/20 16:45:54, 0] smbd/password.c:authorise_login(846)
authorise_login: rejected invalid user nobody

There is the config

[homes]
comment = Home Directories
browseable = no
valid users = %S
writable = yes
create mask = 0700
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
[global]
workgroup = wrkgrp
netbios name = smbserver
security = SHARE
load printers = No
default service = global
path = /home
available = No
encrypt passwords = yes


[share]
writeable = yes
admin users = zirto
path = /home/share
force user = root
valid users = zirto
public = yes
available = yes

And Centos 5.6

Where is my mistake.

Thanks for any help and idea :)

reverend_hh 07-20-2011 10:05 AM

I had the same problem when first setting it up. I added the following section to the config

[SAMBA]

path=/home/user/windowsshare
browseable=yes
writeable=yes
valid users = user

Restart the service and when you do \\sambabox enter the credentials for the "user" specified

ridingthestorm 07-20-2011 10:59 AM

Hi, togitoon,

Well, there may be more than one possibility.

1. Do you want your samba share to be public or accessible with authentication? In the [global] section, if you want the share to be accessible with authentication (not public), you should put "security = user", not "security = share".

2. What password backend do you use in samba? If you don't define it in the [global] section, I think the default is "tdbsam". Is it tdbsam where you added your samba users?

3. Do you have the root user added in your samba password backend (i.e., tdbsam)?

4. Do you have the user "zirto" both in the unix user database and in the samba user database? Passwords don't have to be the same.

5. What permissions does the user "zirto" have for the "/home/share" directory from the unix side? They should be rwx.

I would suggest to leave out all the fineties and test if it works as a simple, public file share first. Then you can add authentication, printers, printer drivers, whatever.

For the simplest file share:

1. Add the root user to your samba password database:
Code:

smbpasswd -a root
<enter a password>

2. Make the share's permissions read/write/execute:
Code:

chmod -R 777 /home/share
3. Put a very simple smb.conf file:
Code:

[global]

  workgroup = workgrp

  netbios name = smbserver

  server string = public server

  security = share

  browseable = yes

  hosts allow = 192.168.1. <of course, adjust it to your LAN>



[share]

  path = /home/share

  comment = testfiles

  read only = No

  guest ok = Yes

4. Test if configuration file is "sane":
Code:

testparm
5. Restart samba.

6. Test from the server, if samba lists its share:
Code:

smbclient -L smbserver
7. If that works, try to access it from the windows machine.

togitoon 07-21-2011 01:16 AM

Sorry for the late feedback. I ll give a try then I ll post the result

togitoon 07-21-2011 01:29 AM

Yeah it works great Then I can think about users , authentication and security issues.

Thanks for the help and ideas.

ridingthestorm 07-21-2011 03:08 PM

You're welcome :) Good luck


All times are GMT -5. The time now is 05:30 AM.