LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-30-2012, 03:02 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
need help configuring samba for no password


Seems like I mess up every samba configuration I touch! I'm trying to configure samba 3.0.25b for no password. Here's the smb.conf I have:

[global]
netbios name = WEBSERVER
workgroup = WORKGROUP
security = share
hosts allow = 192.168.0. 127.
load printers = no
printcap name = /dev/null
printing = bsd
disable spoolss = yes

guest account = ohprso
log file = /var/log/samba.%m
max log size = 50
passdb backend = tdbsam
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = yes
wins support = yes
dns proxy = no

[website]
path = /srv/tomcat/webapps/ohprs
public = yes
guest ok = yes
guest only = yes
writeable = yes
browseable= yes
printable = no
create mask = 0660

[xfer]
path = /home/ohprs/xfer
public = yes
guest ok = yes
guest only = yes
writeable = yes
browseable= yes
printable = no
create mask = 0660

This is a modified version of a smb.conf, with passwords, that worked. Before, I had 'security = user', and 'valid users' in the service sections, and did not have 'guest ok', or 'guest only' in these sections. The previous version worked, but I had to login in with ID and PW.

When I restart samba with the above, it still gives me the User Id and password dialog. Why?
 
Old 09-04-2012, 11:59 PM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
That is because you have disabled anonymous visits to your samba share and have provided credentials for valid users.
So its obvious that you do not want any user to access other user's share.
 
Old 09-12-2012, 10:41 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Well, I don't want "anonymous" access. I want users to access as a guest without having to enter a password and I want the user ID for the guest account to be "ohprso". I have the smb.conf file shown below in a non-Domain LAN which let's local users (192.168.2.0) connect w/o a password as user 'guest' and remotely with password as user 'cantleys'. This works fine. I'm basically trying to accomplish the same thing with the posted config without even bothering with remote access.

I have specified 'security = share' in both cases, 'guest account = xxxx' in both cases and, for the non-passworded local shares 'public = yes, guest ok = yes, guest only = yes' in both cases. I don't get why the below config works and the above config doesn't.

The main difference I see is that the guest account in the working version is actually "guest" and in the non-working config is "ohprso". Does guest account have to litterally be "guest" for this to work? I'm sure I've done it before with another ID as long as that ID is in /etc/passwd.

What do I need to change?

[global]
workgroup = WORKGROUP
security = share
load printers = no
printcap name = /dev/null
printing = bsd
disable spoolss = yes

guest account = guest

log file = /var/log/samba.%m
max log size = 50
dns proxy = no

[webcontent]
hosts allow = 192.168.2.
hosts deny = ALL
path = /www/tomcat/webapps/cantleys/content
writable = yes
browsable = yes
printable = no
public = yes
guest ok = yes
guest only = yes
create mask = 0660

[website]
path = /www/tomcat/webapps/cantleys/content
valid users = cantleys
writeable = yes
browseable= yes
printable = no
public = yes
create mask = 0660

Last edited by mfoley; 09-12-2012 at 11:34 PM.
 
Old 04-09-2013, 02:48 PM   #4
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Solved

Just thought I'd post back my solution.

First of all, I upgraded from samba 3.0.25b to 3.5.8. That did make a difference. I used the -o option of useradd to create a "guest" user with the same uid as the target folder owner: ohprso, no password. Then I made the following smb.conf file. That seemed to do the trick! Note that I also had to remove the old credentials from the various windows workstations: http://windows.microsoft.com/en-id/w...er-credentials

[global]
netbios name = WEBSERVER
workgroup = WORKGROUP
security = share
hosts allow = 192.168.0. 127.

load printers = no
printcap name = /dev/null
printing = bsd
disable spoolss = yes

guest account = guest

log file = /var/log/samba.%m
max log size = 50

passdb backend = tdbsam

dns proxy = no

[website]
path = /srv/tomcat/webapps/ohprs
public = yes
guest ok = yes
guest only = yes
writeable = yes
browseable= yes
printable = no
create mask = 0660
directory mask = 0771

[xfer]
path = /home/ohprs/xfer
public = yes
guest ok = yes
guest only = yes
writeable = yes
browseable= yes
printable = no
create mask = 0660
directory mask = 0771
 
  


Reply



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
[SOLVED] Where is samba password file - need to list samba users explorer Slackware 8 04-06-2011 05:26 PM
After changing Windows AD password Samba\Winbind still uses old password Criller Linux - Security 2 02-28-2008 04:14 AM
Logon samba on other samba password list hernandi Linux - Networking 1 10-14-2003 12:46 PM
Logon samba on other samba password list hernandi Linux - Networking 0 10-14-2003 12:40 PM
Just change Samba password, not Unix password? sorrodos Linux - Networking 1 08-14-2003 07:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:06 PM.

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