LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-30-2005, 05:34 PM   #1
Razbad
LQ Newbie
 
Registered: Jan 2005
Location: Florida
Distribution: Mandrake 10.1
Posts: 8

Rep: Reputation: 0
What is wrong with my smb.conf file?


I'm running samba 3 and my smb.conf is as follows:

# Global parameters
[global]
server string = Samba Server %v
interfaces = 192.168.0.69/24
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
printer admin = @adm

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

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
use client driver = Yes
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

Can anyone please tell me why this does not work?
 
Old 01-30-2005, 06:40 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
can you tell us what is not working ?
can you log in at all ?
when your trying to view network shares, nothing is there ?
prompting for password, but rejecting passwords your typing ?
what kind of activity are you seeing ( if any ) ?
just by looking very briefly, are you only trying to share a printer ?

i'd rather have an idea of what your experiencing when you try
rather then try to pick apart every line of your config ....
 
Old 01-31-2005, 06:13 AM   #3
Razbad
LQ Newbie
 
Registered: Jan 2005
Location: Florida
Distribution: Mandrake 10.1
Posts: 8

Original Poster
Rep: Reputation: 0
sorry, I should have given a little more detail. I was pretty frustrated when I posted this yesterday.

I can only see one share on a win2k machine on my local network and I have no write access to it. I get access denied when trying to write to it. I want to be able to share my linux drives with the windows machines on my network and also be able to access the the windows shares as well as the printer attached to the other windows machine.
 
Old 01-31-2005, 07:12 PM   #4
Razbad
LQ Newbie
 
Registered: Jan 2005
Location: Florida
Distribution: Mandrake 10.1
Posts: 8

Original Poster
Rep: Reputation: 0
well it seems noone knows anything about samba and the documentation is abhorently vague for a newbie. SAMBA SUX!
 
Old 01-31-2005, 09:34 PM   #5
compzoo
Member
 
Registered: Jan 2005
Location: Indiana
Distribution: Suse 9
Posts: 38

Rep: Reputation: 15
samba can be tough to setup. Here is a good setup guide I found googling. It looks like you don't have users setup yet and what files/directories to share,...

http://www.melbpc.org.au/pcupdate/2403/2403article7.htm

or this one

http://www.samba.netfirms.com/sambconf.htm
 
Old 02-01-2005, 07:21 PM   #6
ryanzietlow
LQ Newbie
 
Registered: Oct 2003
Posts: 26

Rep: Reputation: 15
if you are still having problems with samba visit www.webmin.com, it is a web-based administration tool for many programs.
Also i usally set up my samba shares and them manually go to each directorry and set the permissions so that I know without a doubt they are correct.
I recommend playing with smb.conf as much as possible before using webmin, it is much better to actually understand what is happening when a setting is changed rather than just clicking a button and having it change for you (because if that is what you want you might as well stay with ms)

Also you only have one share defined in the file, the home directory (the home directory of whatever user you ar elogged in as)
Try creating another public directory and try that.
ALso the printer directory would be pointed to whatever printers are connected to the samba box. I am not sure if you can define a printer connected to a windows box as a samba share. maybe the avenue you are looking for if you want it connected to the windwos box would be simple printer sharing throught that box?

here is a simple public share

[public]
comment = public
writeable = yes
browseable = yes

Last edited by ryanzietlow; 02-01-2005 at 07:27 PM.
 
Old 02-04-2005, 08:58 PM   #7
Razbad
LQ Newbie
 
Registered: Jan 2005
Location: Florida
Distribution: Mandrake 10.1
Posts: 8

Original Poster
Rep: Reputation: 0
After a week of fiddling with it and scouring various linux forums, I finally have it working as I want. YAY!

I can now see the shares on the Win2k machine and I can write to them, I can finally print to the printer attached to the win2k machine also YAY!

Here's what my smb.conf looks like now and also the steps I took to make this work:
Code:
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2005/02/02 18:25:22

# Global parameters
[global]
	server string = Samba Server %v
	interfaces = 192.168.0.69/24
	map to guest = Bad User
	log file = /var/log/samba/log.%m
	max log size = 50
	server signing = auto
	socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
	os level = 65
	dns proxy = No
	ldap ssl = no
	write list = @fileshare
	printer admin = @adm
	hosts allow = 192.168.0.*

[homes]
	comment = Home Directories
	path = /home/%u
	read only = No
	browseable = No

[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	guest ok = Yes
	printable = Yes
	print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.
	use client driver = Yes
	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

[WIN_C-on-mdkdragon]
	comment = WIN_C-on-mdkdragon
	path = /mnt/win_c
	read only = No
	case sensitive = No
	msdfs proxy = no

[public]
	comment = Public Stuff
	path = /usr/public
	read only = No
1. To access files you need a samba password (which you can add by running 'smbpasswd -a username' as root, or with ksambaplugin - which you can find in contrib).

2. To see the shares on the windows machine I used LinNeighbourhood (installed from RPMDRAKE).

3. One thing else, is check to make sure that samba is running. You can do that from SWAT.
To enable swat ( first have it installed from the rpm's), then as root type
# chkconfig swat on

Then go to your web browser (e.g. firefox or konueror) and type http://127.0.0.1:901

you will be prompted for username and password, enter your root username and password. Next, click on the status image/icon to check the status of the samba modules.

4. For the printer, I couldn't see the printer with linux/samba.
http://forum.mandrakeclub.com/viewto...r=asc&start=15
Yet, when I used KDE printer config utility (I didn't do scan), I specified the ip address of the machine to which the printer is connected, and I used the share name of the pritner (from windows) as the name of printer.

I also specified the user name and password that I used to login to the windows machine, and it worked.

*****************************************************************************************
I take no credit for getting this working as I'm a newbie to linux and relied solely on the wisdom & experience of others, I am including a link here to the thread where I got my answers: http://forum.mandrakeclub.com/viewto...r=asc&start=15
 
Old 04-22-2005, 08:07 AM   #8
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Iam really not an expert in Linux
but if you su to root and then type: testparm
this helped me alot to find the errors in my config file
 
  


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
Help w/ smb.conf file spelltoronto Linux - Newbie 8 08-27-2005 08:35 AM
smb.conf file. vexer Linux - Networking 2 10-17-2004 03:42 AM
Can I still use my old smb.conf file? jspaceman Linux - Networking 2 10-01-2003 11:55 PM
smb.conf file MattLaw Linux - Networking 2 10-01-2003 10:26 AM
Easiest way to get to RH 9 SMB.CONF File? ikw38 Linux - Networking 4 06-29-2003 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:26 AM.

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