LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   What is wrong with my smb.conf file? (https://www.linuxquestions.org/questions/linux-networking-3/what-is-wrong-with-my-smb-conf-file-284224/)

Razbad 01-30-2005 05:34 PM

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?:scratch:

DrOzz 01-30-2005 06:40 PM

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 ....

Razbad 01-31-2005 06:13 AM

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.

Razbad 01-31-2005 07:12 PM

well it seems noone knows anything about samba and the documentation is abhorently vague for a newbie. SAMBA SUX!

compzoo 01-31-2005 09:34 PM

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

ryanzietlow 02-01-2005 07:21 PM

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

Razbad 02-04-2005 08:58 PM

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

ALInux 04-22-2005 08:07 AM

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


All times are GMT -5. The time now is 05:41 AM.