Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Errors when using testparm 1

Status
Not open for further replies.

bLaDe79

Technical User
May 8, 2003
6
AU
Hi Guys,
I have been trying to get Samba working between my Linux box (Mandrake 9.0) and my Windows box (XP) but aren't having much luck.

I recently used 'testparm' on my Linux box to find I am getting the following error a number of times for the shared directories it appears. Below is what is put on the screen when I run it

Load smb config files from /etc/samba/smb.conf
params.c:parameter() - Ignoring badly formed line in configuration file:
params.c:parameter() - Ignoring badly formed line in configuration file:
Processing section "[homes]"
params.c:parameter() - Ignoring badly formed line in configuration file:
Processing section "[printers]"
params.c:parameter() - Ignoring badly formed line in configuration file:
Processing section "[public]"
params.c:parameter() - Ignoring badly formed line in configuration file:
Processing section "[Web_Page]"
Processing section "[Temp]"
params.c:parameter() - Ignoring badly formed line in configuration file:
Loaded services file OK.
Press enter to see a dump of your service definitions

If a list of services would be useful I will put them up as well, I didn't think it would be such a good idea due to it being fairly long.

Any help on this one would be greatly appreciated.

Thanks
Darren
 
Hi
The problem is in your smb.conf file. You have given either wrong parameters or for example missed an "=" sign or commented a line which should not be under comments etc..
Check your smb.conf file thoroughly and this will solve the issue. Post the smb.conf file and we can have a look.

regards
MP
 
Below is an exact copy of what is contained in my smb.conf

Please if I have done something which I shouldn't have please let me know, I am still on the huge Linux learning curve and learning new things each day :)

Thanks guys, its great to see places out there like this who help the less educated in a particular area.

# Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2003/05/04 10:53:35

# Global parameters
[global]
log file = /var/log/samba/log.%m
load printers = yes
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
null passwords = yes
encrypt passwords = yes
passwd program = /usr/bin/passwd %u
wins support = true
dns proxy = No
netbios name = SERVER
printing = cups
server string = Linux Box
unix password sync = yes
os level = 20
auto services = global homes printers public Web_Page Temp
printcap name = lpstat
max log size = 50

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

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
lpq command = lpstat -o %p
lprm command = cancel %p-%j
browseable = Yes

[public]
comment = Public Stuff
path = /home/samba/public
write list = @staff
guest ok = Yes

[Web_Page]
comment = Web Page
writeable = yes
public = yes
path = /var/
[Temp]
comment = Temp Directory
writeable = yes
public = yes
path = /tmp
 
Let me suggest you a couple of workarounds.

Make sure what editor ur using and remmeber about the line feed. Always follow standard naming for eg: use either uppercase or lower case characters. Although they dont mean much but these are good practices.. for eg you have used "yes" as well as "Yes"

Our goal is to get the basic smb.conf working and then add more options one by one.

In global
set socket options to TCP_NODELAY
remove null passwords line
wins support = yes
remove printcap name and auto services line
unix passwd sync = true

retstart samba after u edit the file.

Check to see whether the errors are the same or whether there is any improvement.

regards
MP
 
Thanks for the suggestions, I followed as you said Murugs and it does make sense keeping everything uniform.

On the downside though, the exactly same errors come up when I run 'testparm'.
 
I have had the same problem. Remove any blank lines or put a comment character at the begining and the messages will go away.

Lee.
 
Thanks LeeMason, I have that a try and bobs your uncle, it worked perfectly :)

Thanks a lot
 
Damn spelling errors, you've gotta love them.

Anyway throughout the smb.conf file I found a whole pile of ^M and ^H after the share name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top