Jeff W
2011-May-05 09:10 UTC
[Samba] Cant get authenticated readwrite and guest readonly configured properly
Hi, I've spent the past 4 and a half hours trying to figure out how to configure Samba the way I want, and I'm starting to wonder if what I want to do is impossible. I've read the man page for smb.conf trying to figure out what magic combination of options will work, and have scoured as much Samba documentation as I can find looking for the right recipe, but I'm having no luck. I'm hoping someone here can help enlighten me. What I want is pretty simple, or so I thought. Share 1 - media read only as guest read write if authenticated Share 2 - porn read write if authenticated no guest access In my tweaking of the settings it seems like I keep going back and forth not able to find the right balance. At one point I was able to read and write, but wasn't able to get in without a password, and at other times I've managed to configure it for guest access but it won't let me authenticate successfully. My present situation, is that I have guest access, but it will not authenticate my username and password. I have run smbpasswd for the samba user. I'm running Samba Version 3.2.5 on Debian. Here is my smb.conf file, with the comments stripped. Any help is appreciated :) Thanks. [global] workgroup = WORKGROUP server string = Fileserver on %h ; wins support = yes ; wins server = w.x.y.z dns proxy = yes ; name resolve order = lmhosts host wins bcast ; interfaces = 127.0.0.0/8 eth0 ; bind interfaces only = yes log file = /var/log/samba/log.%m max log size = 1000 syslog only = no syslog = 1 log level = 2 panic action = /usr/share/samba/panic-action %d security = share encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes ; domain logons = yes ; logon path = \\%N\profiles\%U ; logon drive = H: ; logon script = logon.cmd ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u ; add group script = /usr/sbin/addgroup --force-badname %g ; printing = bsd ; printcap name = /etc/printcap ; printing = cups ; printcap name = cups ; include = /home/samba/etc/smb.conf.%m ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & ; idmap uid = 10000-20000 ; idmap gid = 10000-20000 ; template shell = /bin/bash ; winbind enum groups = yes ; winbind enum users = yes ; usershare max shares = 100 [media] comment = Movies and shows and stuffs path = /mnt2/media browseable = yes guest ok = yes read only = no users = chris [porn] comment= Does not contain pictures of puppies path = /mnt5/porn browseable = yes guest ok = no read only = no users = chris
Jeff W
2011-May-05 09:15 UTC
[Samba] Cant get authenticated readwrite and guest readonly configured properly
I should add, I've been going through The Samba Checklist, http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/diagnosis.html to try and figure out what's wrong, but so far all it's helped me figure out is that there is a problem, the checklist suggests no fixes for the error messsage that I'm seeing, which is this; shmee:~# smbclient //SHMEE/porn -Uchris Enter chris's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.2.5] Server not using user level security and no password supplied. Server requested LANMAN password (share-level security) but 'client lanman auth' is disabled tree connect failed: SUCCESS - 0 I've googled for what these error messages mean but the only pages that come up are concerning bugs from back around 2003 and Ubuntu pages which are painfully unhelpful ("I have this problem....", and the next post is "Nevermind, fixed it" with no explenation of how or why it failed). Any insight into why it's failing? The username and password used are both valid on the unix system, I can ssh in with them. Thanks for any suggestions in advance.
Seemingly Similar Threads
- Howto determine flags like readonly and readwrite.
- First Gluster Volume deploy: recommended configuration and suggestions?
- ReadWrite.xls problem
- Dovecot and stale nfs-locks hanging processes
- Domain-member and simple read and readwrite file-permissions based on group-membership