Jump to content

Getting Samba to work with guests [solved]


hanes
 Share

Recommended Posts

I have always had problems getting samba to work well. I am in a wireless home network and I want to share my mp3's and movies, I want to do this from my Mandriva computer. I want these directories to be readable/writable by guests in the network. I want my computer to show up in "Network Neighborhood".

 

After screwing with this file, I gotta come here for help. What am I doing wrong?

 

smb.conf

 

[global]
workgroup = ShareGroup
server string = Samba Server %v
netbios name=netbiosname
security=share
map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap cache time = 60
printcap name = cups
dns proxy = No

[homes]
comment = Home Directories
read only = No
browseable = No

[print$]
path = /var/lib/samba/printers
write list = @adm, root
inherit permissions = Yes
guest ok = Yes

[pdf-gen]
comment = PDF Generator (only valid users)
path = /var/tmp
printable = Yes
printing = bsd
print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" &
lpq command = /bin/true
lprm command = lprm -P'%p' %j
[printers]
path = /var/spool/samba
comment = All Printers
browseable = yes
printable = yes
print command = lpr-cups -P %p -o raw %s -r
guest ok = yes
use client driver = yes

[DataShare]
path = /mnt/data/Share/
comment = Downloads
browseable = yes
public = yes
writable = yes
read list = hanes
write list = hanes
admin users = hanes
valid users = hanes
null passwords = yes
guest ok = yes

[Music]
path = /mnt/data/music/
comment = Music
browseable = yes
public = yes
writable = yes
null passwords = yes
guest ok = yes
guest only=yes

 

When I try to connect from my laptop I get this error in the samba log.

 

[2006/04/18 16:56:18, 1] smbd/service.c:close_cnum(835)

t43 (192.168.2.133) closed connection to service DataShare

[2006/04/18 17:29:08, 0] lib/util_sock.c:read_data(526)

read_data: read failure for 4 bytes to client 192.168.2.133. Error = Connection reset by peer

[2006/04/18 17:29:09, 1] smbd/service.c:close_cnum(835)

t43 (192.168.2.133) closed connection to service DataShare

 

Any ideas how to fix my Samba?

Edited by hanes
Link to comment
Share on other sites

I've used swat to configure samba, it's pretty cool:

 

urpmi swat

 

It should be relatively easy to configure this way. There is a samba faq on this board and you can use configuration wizards for samba too under mcc:

 

urpmi drakwizard

 

unfortunately, I don't know samba that well, but I would have thought these two items might be able to help you out.

Link to comment
Share on other sites

... make sure you have created and enabled samba user "hanes" with smbpasswd command. There is also no hosts aloow= xxx.xxx in your [globals] section. By default it is like "deny all" if I remember it right.

 

BTW i have not checked it, but valid users = hanes and guest ok = yes seem contradictory.

Link to comment
Share on other sites

man, this is aggravating.

 

Swat is a really confusing app, after you find out you have to connect on localhost:901, you are quickly presented with a very unintuitive menu. There are plenty of values, and one is left guessing on what to type in them, for example there is a textbox called Guest, i entered "yes", I entered "Hell Yes", I entered "Yes Please work what the #$@$ is the problem?", none of these seemed to work as expected.

 

I have tried the mcc "Manage samba partitions" option. I add a share, it kicks me out of mcc (crashes). I turn mcc back on, my share wasnt added, I repeat until my head explodes.

 

I have erased the "valid users" line and still get bupkiss... anyone got any solutions over here?

Edited by hanes
Link to comment
Share on other sites

Well when you need answers, go to the source I guess. I found some good advice at the official Samba HowTo

 

Here is my working smb.conf

 

[global]
workgroup = Workgroup
netbios name = Baulz
security = share

[data]
comment = Data
path = /mnt/data/Share
force user = guestpc
force group = users
read only = No
guest ok = Yes

 

 

Then all I had to do was make a user called guestpc, and chmod the directories properly. If anyone has similar problems here is a link to the page that helped... http://us2.samba.org/samba/docs/man/Samba-.../FastStart.html

Link to comment
Share on other sites

  • 1 month later...

Also you can try to share them but through http, you can do this installing gnump3d which will publish all your mp3 in a website running in your computer. So the users can just go to your internal ip 192.168.x.x:8888 and vioala your whole library to play.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...