Operating System - HP-UX
1752574 Members
4561 Online
108788 Solutions
New Discussion юеВ

Samba configuration question

 
SOLVED
Go to solution
Robert Thorneycroft
Valued Contributor

Samba configuration question

I seem to be having a problem configuring Samba that I just cannot get to the bottom of.

Recently I had a server failure and I had no choice but to do a complete fresh installation without restoring from tape, as such I ended up installing a new version of Samba which I obtained from the HP SW center.
samba 2.2.3a

Afterwards I tried restoring my old configuration file literally just allowed one filesystem to be available with a unix account logon and password but it no longer works.

I managed to set up a public share with guest access with no problems but this is of no use as the information that needs to be exported is payroll data but at least this proves that the software is installed correctly.

Can anyone please post an example of how the configuration file should look to enable one filesystem to be exported with only standard unix logon and password for authentication.

Kind regards,

Robert Thorneycroft
9 REPLIES 9
RAC_1
Honored Contributor

Re: Samba configuration question

The smb.conf is basically divided into two parts.-global and shares.

For global parameters applies to al shares you define in smb.conf file.

Post the error message you are getting.

Regards,
There is no substitute to HARDWORK
Stefan Farrelly
Honored Contributor

Re: Samba configuration question

Heres our /etc/opt/samba/smb.conf
Orion is the name of our server and we have multiple vols exported;

# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2003/07/15 16:51:03

# Global parameters
[global]
netbios name = ORION
server string = Samba Server
security = SERVER
encrypt passwords = Yes
password server = orion
syslog = 0
log file = /var/opt/samba/log.%m
max log size = 1000
local master = No
read only = No
short preserve case = No
dos filetime resolution = Yes

[homes]
comment = Home Directories
browseable = No

[tmp]
path = /tmp

[root_home]
path = /root_home

[swdepot]
path = /swdepot

[tony_pc]
path = /tony_pc

[tmp_mnt]
path = /tmp
Im from Palmerston North, New Zealand, but somehow ended up in London...
RolandH
Honored Contributor

Re: Samba configuration question

Example for Global Part:

[global]
server string = SAMBA
allow hosts = ALL

workgroup = WORKGROUP
guest only = yes
dead time = 5
security = share

guest account = lp
auto services = lp
postscript = no
print command = /usr/bin/lp -d %p %s ; /usr/bin/sleep 10 ; /usr/bin/rm %
s
printcap name = lpstat
load printers = yes
socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=8192 SO_RCVBUF=8192
preserve case = yes
short preserve case = yes
unix password sync = yes

browsable = yes
share modes = yes
browsable = yes
share modes = yes
os level = 64
wins support = Yes

Example for Specific Part:
[test]
path = /test
public = yes
writeable = yes


Example for Printer Part:
[printers]
comment = Networkprinter
printable = yes
path = /tnq/Printerqueue
printing = hpux
public = yes
guest ok = yes
browsable = yes








Sometimes you lose and sometimes the others win
Francisco J. Soler
Honored Contributor

Re: Samba configuration question

Hi Robert,

In the old samba version, by default the parameter security is set to shared, in the new samba versions this is not by default.

Perhaps adding in the [global] section this directive you can put all in order:

security = share

HTH
Frank.
Linux?. Yes, of course.
Darren Prior
Honored Contributor

Re: Samba configuration question

Hi Robert,

Can you post your old smb.conf - we might be able to make a minor correction to that rather than posting lots of different customised files!

regards,

Darren.

PS: Stefan - Just a quick fyi from the smb.conf man page: "Never point a Samba server at itself for password serving. This will cause a loop and could lock up your Samba server!"
Calm down. It's only ones and zeros...
Robert Thorneycroft
Valued Contributor

Re: Samba configuration question

Thanks for the help so far, as requested here is my original smb.conf file:

# Samba config file created using SWAT
# from opcpc01.brake.co.uk (150.150.101.201)
# Date: 2003/06/11 13:18:37

# Global parameters
[global]
workgroup = UK_BRAKES
server string = tst01: Samba Server
password server = *
syslog = 0
log file = /var/opt/samba/log.%m
max log size = 1000
local master = No
wins server = 150.150.119.101
read only = No
short preserve case = No
dos filetime resolution = Yes

[homes]
comment = Home Directories
browseable = No

[edi]
comment = EDI data share
path = /edi

[dataload]
comment = dataload share
path = /usr/sap/trans/DATALOAD



below is also a copy of the file I am currently using, this one is primarily based on the Orion example above. When I try to connect to the server using this script I get the user id and password box displayed however when I enter a unix user id and password the NT box respondes with incorrect password or incorrect username for: \\tst01\edi

# Samba config file created using SWAT
# from opcpc01.brake.co.uk (150.150.101.201)
# Date: 2003/07/25 12:23:36

# Global parameters
[global]
workgroup = UK_BRAKES
netbios name = TST01
security = SERVER
encrypt passwords = Yes
password server = tst01
log file = /var/opt/samba/log.%m
max log size = 1000
log level = 3
preferred master = False
local master = No
read only = No
short preserve case = No
dos filetime resolution = Yes

[dataload]
comment = tst01 DATALOAD directory
path = /usr/sap/trans/DATALOAD

[edi]
comment = tst01 edi directory
path = /edi

[edi2]
comment = tst01 edi2 directory
path = /edi2

I am afraid I am about to finish work for the day so I will not be able to answer any further questions or give ratings till Monday morning. Have a good weekend everyone and thanks for your help so far.

Regards,

Robert Thorneycroft
Darren Prior
Honored Contributor
Solution

Re: Samba configuration question

Hi Robert,

I think Francisco has got the answer - you haven't defined a security level in your previous smb.conf, so the default for the new version is being used, which is different to the older version you had. The default for newer versions is user; which requires a smbpasswd file to be created (hence the error message you're seeing.)

Share security isn't a particularly nice method of authentication; it's documented in Chapter 6 in the O'Reilly Using Samba book (which you can access via SWAT.) I believe adding a security = share line in your [global] section of your original smb.conf will fix your problem, though I'd suggest you look at the other security methods for the future.

regards,

Darren
Calm down. It's only ones and zeros...
RAC_1
Honored Contributor

Re: Samba configuration question

This may be dumb question, but have you added edi user with smbpasswd -a command.

What is the errror you get in log file?
There is no substitute to HARDWORK
Robert Thorneycroft
Valued Contributor

Re: Samba configuration question

For some reason the above suggestions still would not work, so in the end I set up the security as USER and created smbpasswd entries for the users to connect with, which whilst not 100% ideal will have to do.

Thanks for all the help.

Kind regards,

Robert Thorneycroft