Page 1 of 2

How to share files and folders with Windows

Posted: Sun 13 Jan 2008, 10:44
by hiro
I finally have my network set up to share files with Windows, and thought i might post my experiences here, this is basically what i needed to do to allow a windows machine to access a folder on the puppy machine. I gathered the information from all over the place so thought i would post it here in case other newbies like myself may find it useful. If any experts would like to make a comment i will happily correct mistakes or add anything important i may have missed out.

Installing Samba
Use the Puppy package manager and get the file "Samba-3.0.25b:SMB file and print server", this will install automatically but throw an error saying it needs a file called libdm.so.0 but doesn't know where to find it. Get the file from here and unzip it into the folder /lib then open up a terminal and type "ln -s /lib/libdm.so.0.0.4 /lib/libdm.so.0" without the quotes.

Setting up Samba
Now edit the file /etc/smb.conf using you favourite text editor, it may be a good idea to back this file up first just in case. This file can be very complicated so it is best to go here and use this example as it is what i used and it worked. The only change i had to make was to leave out the line "msdfs proxy = no" as for some reason this caused an error and samba would not work.

Testing samba
Open a terminal window and type "testparm", the output from this will tell you if there are any errors in the syntax of your smb.conf file. If all is ok type "/usr/sbin/smbd" then "/usr/sbin/nmbd" and samba should be up and running. Type "smbclient -L \\\\\puppypc\\" (change puppypc to whatever your machine is called or type your machines IP address in place of it's name), this should give a status report for samba.

Sharing a folder
I created a new folder called /sharedstuff and gave it full read/write permissions for everyone and can now access it from any windows box on my network.


My smb.conf file is included below for reference, it does seem i can comment out many of these lines and things still work fine, but most tutorials on setting up Samba say to use these line, although none seem to explain why in plain english, so i leave them in.

Code: Select all

[GLOBAL SECTION]

workgroup = HOME
server string = Samba Server
security = share
server signing = no
paranoid server security = no
read only = no
case sensitive = no
restrict anonymous = no
netbios name = PUPPYPC
max protocol = NT
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
domain master = no
prefered master = no
dns proxy = no
ldap ssl = no

[puppypc section]

path = /
guest ok = yes
writable = yes
force user = root
browseable = yes

[sharedstuff section]

Path = /sharedstuff
guest ok = yes
writable = yes
force user = root
browseable = yes
I have just one more salient point, after editing the smb.conf file i seem to have to reboot the whole pc for changes to take effect, i tried restarting smbd and nmbd using "/usr/sbin/smbd restart" and i tried "/usr/sbin/smbd stop" followed by "/usr/sbin/smbd" but still the changes did not work until after a reboot.
Finally a big thank you to all the people who helped me get this far, Hiro

Posted: Sun 13 Jan 2008, 15:08
by paulh177
hmm what's the difference between

Code: Select all

guest ok = yes
and

Code: Select all

guest = ok
?

Posted: Sun 13 Jan 2008, 16:22
by hiro
Sorry that was a typo i have edited post to read as it should, guest ok = yes

Posted: Sun 13 Jan 2008, 17:24
by paulh177
hiro wrote:i tried restarting smbd and nmbd using "/usr/sbin/smbd restart" and i tried "/usr/sbin/smbd stop" followed by "/usr/sbin/smbd"
stopping and restarting samba can be accomplished by

Code: Select all

/etc/rc.d/rc.samba stop
and

Code: Select all

/etc/rc.d/rc.samba start
calling the binaries with the parameter stop won't work (they have cli options but starting and stopping are not included). the startup script uses killall to accomplish the stop.

paul

Posted: Mon 14 Jan 2008, 04:20
by disciple
Very good.
Funny... I was sure I needed a "Public=Yes" line either in the global section or for each share...
So is that config file now the minimum necessary - after you've played around and figured out all the lines you could leave out? Or is it just different from mine because you changed what you already had until it worked, rather than copying mine?

Posted: Mon 14 Jan 2008, 17:52
by kelewax
I have done all this and its working but still dont know how to see files on a windows system in the network from my puppy system

Posted: Mon 14 Jan 2008, 18:33
by hiro
I tried as you suggested Paul but just get told "permission denied" which seems a bit strange, maybe i have misunderstood but i thought you were always the root user in Puppy so surely i should be able to do it. I would ideally like it to start automatically at boot up so suppose i will have to figure out how to do that sometime.
I just looked back at your original post Disciple and to be honest i missed the line "public = yes" as it was tucked in above the comment and as per usual i was too keen to get on and didn't study it properly. Still at least that proves that you don't need that line. I basically copied your file apart from missing that one line, however my system threw an error about an incorrect nt network name or something so i merely commented out all the lines i didn't understand (most of them) and it worked so i put them back in one at a time and found the line "msdfs proxy = no" caused the problem so left it out, is it in you file?
Kelewax, i am using my Puppy system as a file server so do not need to see windows shared folders on a regular basis so i just use LinNeighborhood, it's very quick to set up and easy to use.
Hope this helps, Hiro.
PS if anyone is familiar with VNC server please have a look at the post i have in the beginners help section, thanks :).

Posted: Tue 15 Jan 2008, 04:32
by disciple
Kelewax - Puppy has always had LinNeighborhood for that, which works well, but can be confusing to set up. It should be easier for you to use pnethood, which will replace it in Puppy 4. If you want help setting up LinNeighborhood, I have some advice at the bottom of the page hiro linked under "setting up Samba" in the first post. You could also find the Muppy-smb package, which I think automatically mounts shares when you run it.
and found the line "msdfs proxy = no" caused the problem so left it out, is it in your file?
Yes, it is, but I only have Windows 98 clients, which could be why it works for me but not you.

Posted: Tue 15 Jan 2008, 04:32
by disciple
I blame the *#$ windows XP at work for the double post :)

Posted: Tue 15 Jan 2008, 06:47
by hiro
Before using LinNeighbourhood you will need to open up the preferences and enter you network name in the appropriate slot or it will not work. Please don't ask me how i know this! Hiro.

Posted: Tue 15 Jan 2008, 08:56
by disciple
Ah - no, I'm pretty sure you can actually set it up so that you don't need the workgroup name - you should be able to have LinNeighborhood automatically browse all workgroups on your network when it starts up. But don't ask me how I know this (or how to set it up properly - I can't remember) :)

For anybody who wants to do things the fast way, I'm pretty sure this was working well before I removed LinNeighborhood, so try just putting this (with the correct workgroup name) in /root/.LinNeighborhood/preferences before starting LinNeighborhood:

Code: Select all

 quick_browse = yes
 share_scan_as_user = no
 workgroup = HOOD
 root_mnt_directory = /mnt/network
 memorize_mount = no
 run_file_manager = yes
 file_manager = rox -d $MOUNTPOINT
 scan_password_once = no
 machines_scan_as_user = no
 groups_scan_as_user = no
 save_default_password = yes
 replace_space_mount = yes
 mount_default_no_dialog = yes
http://en.wikipedia.org/wiki/Distribute ... crosoft%29
I can't see why you should need Samba acting as a MSDFS proxy (except that maybe XP is more stupid than 98), but I guess you've just got to do what works :)

Network printing using Ms Windows

Posted: Sat 15 Mar 2008, 21:07
by whyme
Can I print using LinNeighborhood?

I have the printer connected to a Desktop Pc running WindowsXP.

And have an alternate Pc with Puppy 2.17. Both computers are successfully connected through LinNeighborhood.

I wonder how to share the printer so I may print from the remote Puppy Desktop.

I have file and printer share enabled on the Windows PC and I can see the printer folder in the Linneighborhood window.

Do I need to install a Printer driver on the Puppy machine?

Posted: Sat 15 Mar 2008, 21:50
by disciple
Can I print using LinNeighborhood?
No

2.17 has CUPS printing doesn't it?
If there is a linux driver available for your printer (check at linuxprinting.org):
-I'm not sure if 2.17 includes smbspool, so open a terminal and run

Code: Select all

which smbspool
to see. If it isn't there, get it from here and extract it to /usr/bin.
-install the printer driver if it isn't already in Puppy.
-go (in Puppy) to http://localhost:631/printers and set up the printer. When you choose "type" or "location" or something, there is an option "Windows printer via Samba" (or something like that).
-everything else should be fairly self-evident.

If there isn't a linux driver for your printer, there is a tricky way of still printing to it - I've got a link to the howto from the printing page on the puppy wiki, but I think the instructions might be for XPDQ, so it might be a slightly different under CUPS.

Also, if you instead want to have the printer on a Puppy machine, and share it with Windows machines, there are instructions here:)

Posted: Sat 15 Mar 2008, 22:03
by whyme
Thank you for your incredibly fast and informative response disciple.

I will return to post with my progress. :)

Posted: Mon 17 Mar 2008, 06:28
by whyme
No luck finding a driver for Canon pixma ip1500 yet

Posted: Mon 17 Mar 2008, 06:29
by whyme
No luck finding a driver for Canon pixma ip1500 yet

:roll:

Posted: Mon 17 Mar 2008, 06:29
by whyme
No luck finding a driver for Canon pixma ip1500 yet

:roll:

Posted: Mon 17 Mar 2008, 06:31
by whyme
No luck finding a driver for Canon pixma ip1500 yet

:roll:

found this
http://mambo.kuhp.kyoto-u.ac.jp/~takushi/#canon
but too confusing

Posted: Sat 28 Jun 2008, 23:54
by edoc
I get here ...
Testing samba
Open a terminal window and type "testparm", the output from this will tell you if there are any errors in the syntax of your smb.conf file. If all is ok type "/usr/sbin/smbd" then "/usr/sbin/nmbd" and samba should be up and running. Type "smbclient -L \\\\\puppypc\\" (change puppypc to whatever your machine is called or type your machines IP address in place of it's name), this should give a status report for samba.


... and the process stops with an error. :-(

Code: Select all

# /usr/sbin/smbd
/usr/sbin/smbd: error while loading shared libraries: libdm.so.0: cannot open shared object file: No such file or directory
# 

Posted: Sun 29 Jun 2008, 01:37
by disciple
Have you searched for libdm? This issue has been dealt with before, so if you search the forum for posts with samba and libdm in them, you should find the solution.