Howto: Set up a simple (insecure) Windows compatible network

How to do things, solutions, recipes, tutorials
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Howto: Set up a simple (insecure) Windows compatible network

#1 Post by disciple »

N.B. I was going to put this on the wiki, but the server account seems to have been suspended - I hope we don't lose everything - I'd only just got the printing page quite useful :(
------------------------------------------
If you're using Puppy, which is a single user, root only distribution, you probably aren't too concerned about security, and there's a good chance if you want to set up a network, you don't want to bother with user accounts and passwords.
This is the easiest way to set up a "server" that any computer on your lan(Windows or Linux/Unix with Samba) can connect to and have full read/write access.

For example, our main computer is much newer than our other ones, so it is always the first one turned on, and we essentially use it as a server - we keep files on it, have the printer connected to it, and have the same email account set up on all the computers, using the mail directory on this one (it seems to be perfectly safe to do this - even using Thunderbird on several machines simultaneously :) ). Because I dual boot this computer, I need to have it set up so it looks identical on the network whether it is in Windows or in Puppy, so all the shortcuts on the other computers work. Here is what to do:

- Install the full samba on the "server" - the computer you want to be able to connect other computers to. There is a full samba dotpup, which is huge, or I think you can get by with muppy-smb and the samba petget package.

- Put something like this in your smb.conf (probably /etc/samba/smb.conf):

Code: Select all

;*******************section global*****************
[global]
public = Yes
;this is the name of the windows workgroup the computer should show up in, so should match whatever you use in any Windows computers
workgroup = HOOD
server string = Samba Server %v
security = share
log file = /var/log.%m
max log size = 50
server signing = No
paranoid server security = No
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
preferred master = No
domain master = No
dns proxy = No
ldap ssl = No
message command = /usr/local/bin/LinPopUp "%f" "%m" %s; rm %s
read only = No
case sensitive = No
;this line works for me, but I have commented it out as other people say it causes trouble with Windows XP clients.
;msdfs proxy = No
restrict anonymous = No
;this is the name of the computer on the network, so if you are dual-booting, it should match what your computer is called in Windows
netbios name = Green Room
max protocol = NT
;*******************section printers*****************
;I think Cups automatically shares printers with other PCs running CUPS, so this is mainly useful for Windows clients.
[printers]
browseable = yes
printable = yes
create mode = 0700
guest only = yes
use client driver = yes
path = /tmp
;*******************section green room*****************
[green room]
path = /mnt/home
guest ok = Yes
writeable = Yes
force user = root
;*******************section e*****************
[e]
path = /mnt/hdb5
guest ok = Yes
writeable = Yes
force user = root
;*******************section f*****************
[f]
path = /mnt/hdb6
guest ok = Yes
writeable = Yes
force user = root
;*******************section Puppy*****************
[Puppy]
path = /
guest ok = Yes
writeable = Yes
force user = root
Network Identification
For identification of the computer on the network, the two lines I commented in the global section (workgroup and netbios name) are important. Change them to something appropriate.

Printing
The printers section I used should allow any computer on the network (Windows or Linux) to see and print to any printers installed on this server, using drivers installed locally on the client computer - this is the way small Windows networks are normally set up. So if you install a printer on the server (which you are dual booting) and give it the same name as you use in windows, other machines should see it and print to it the same, whether the server is in Windows or in Puppy. This means that people should stop complaining because they can't print because you are in Linux :) (This works with Cups, I don't know if you can do it using XPDQ printing).
To make this work though, you need to open /etc/cups/mime.convs and uncomment this line near the end:

Code: Select all

#application/octet-stream	application/vnd.cups-raw	0	-
, and open /etc/cups/mime.types, and uncomment this line near the end:

Code: Select all

#application/octet-stream
You also need to download smbspool and extract it to /usr/bin if you don't already have it.

Shared Folders
The sections after the printers section are for each individual folder that I want to share on my computer, and because I am dual booting, they match the shared drives and folders I have in Windows. They have the path to them in Puppy, and the name of them in the network, which matches the names they have on the network in Windows. (Just to confuse things, I happen to have my C: drive showing up as green room on the network, when the computer is also called Green Room). I also have the Puppy section to share the whole Puppy filesystem, and if Puppy is your only operating system, this may be the only shared folder you want. If you don't want to share the whole filesystem, you could share /root/my-documents, or whatever.
If you are dual-booting like me and trying to look like Windows, then you'll probably want to mount the partitions your shared folders are in at bootup - check out the "personal-start-reboot-scripts" dotpup.

----------------------------
For the "client" computers, if they don't need to be "servers" themselves, then you can just install the samba petget package on them, and use LinNeighborhood to browse the network (It's not necessarily that intuitive, so Rarsa gave a fairly good explanation at http://www.murga-linux.com/puppy/viewtopic.php?t=2163), or you can install Muppy-smb, which will automatically mount network shares. I believe Muppy-smb also has a gui for adding a shared folder on a server.

EDIT - starting with Puppy 4, LinNeighborhood will be replaced by pnethood, which is much easier, and can also be installed in older Puppies if you have gtkdialog3

EDIT - just thought I'd point out that some people are getting confused because I identify my computer on the network as "Green Room" (this is the netbios name), but I also share its "C: drive" as "Green Room" i.e. /mnt/home is shared as //Green Room//Green Room).

----------------------------
If something doesn't work, please post and we'll try and sort you out. I had terrible trouble getting printing to work, so forget about all the other ways people say to do it, and stick to exactly what I've described, without any extra lines or anything, and see if that works.
Last edited by disciple on Thu 02 Oct 2008, 02:54, edited 8 times in total.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

Well, almost 400 people read it, but very few must have tried :), because I just tried following my own instructions and found (to my horror :oops: ) that you can't have comments following anything on the same line in smb.conf

-----------------
LinNeighborhood tips:

To use LinNeighborhood with the least effort possible, I find I have to uncheck "Always scan as user", and check all four options in the group below it (on the preferences->scan tab).

Also there seems to be a bug in LinNeighborhood, and it won't unmount shares if you mount them without having the option checked to replace spaces with underscores (on the miscellaneous tab).

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

I have Windows 98 clients. SOME PEOPLE SEEM TO NEED TO REMOVE THE

Code: Select all

msdfs proxy = No
LINE FOR IT TO WORK WITH THEIR WINDOWS XP CLIENTS.

DavidBell
Posts: 132
Joined: Fri 24 Nov 2006, 21:44

#4 Post by DavidBell »

Hello

I'm trying to get a usb drive on my puppy 2.16 to read/write in windows xp, it goes through a netgear modem/router that has a really slow usb connection where is does work (workgroup = 'workgroup') but I'm trying to do the same thing from puppy.

I installed Samba 3.0.21c from dotpups.de and it all seems to work OK, but I'm just refreshing My Network Places in windows and it doesn't show up. Is there something else I need to do?

Thanks in advance for any help. DB

More detail

Code: Select all


### My smb.conf ###################
[global]

public = yes
workgroup = workgroup
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]

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

[smblacie]
path = /mnt/sda1
guest ok = yes
writable = yes
force user = root
browseable = yes

[smbchoices]
path = ~/Choices
guest ok = yes
writable = yes
force user = root
browseable = yes


### Output from smbclient -L ###################

sh-3.00# /etc/rc.d/rc.samba stop
sh-3.00# /usr/sbin/smbd
sh-3.00# /usr/sbin/nmbd
sh-3.00# smbclient -L \\\\\puppypc\\
Password: 
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.21c]

        Sharename       Type      Comment
        ---------       ----      -------
        puppypc         Disk      
        smblacie        Disk      
        smbchoices      Disk      
        IPC$            IPC       IPC Service (Samba Server)
        ADMIN$          IPC       IPC Service (Samba Server)
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.21c]

        Server               Comment
        ---------            -------
        PUPPYPC              Samba Server

        Workgroup            Master
        ---------            -------
        WORKGROUP            
sh-3.00#

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#5 Post by disciple »

It looks like it is sharing itself properly and the windows machines are somehow having trouble seeing it. Presumably you have tried restarting them (and then waiting a while as sometimes computers take a while to talk to each other) - that often works :)

Can the Puppy pc see itself - e.g. with LinNeighborhood?

If LinNeighborhood is set up correctly then it will automatically show you browseable things on the network - I think if you grab my config file from the bottom of the page http://murga-linux.com/puppy/viewtopic. ... 19b24]here and put in the correct workgroup name, then that should work.

Does the internet work on both PCs? (Just wondering if the router is assigning IP addresses properly and stuff...)

There must also be a way of connecting to a computer that you can't browse to in Network Neighborhood in XP, by manually putting in the host name or IP address of the server... I'm pretty sure you can manually put in the address for the "map network drive" feature anyway.

The best advice I think I can give you is like I said - first copy my smb.conf, change the workgroup name, and see if that works. If it doesn't, remove the msdfs proxy line, and see if that works. It is very easy to have SAMBA set up in a way that seems right, but just doesn't work, and for no obvious reason.

DavidBell
Posts: 132
Joined: Fri 24 Nov 2006, 21:44

#6 Post by DavidBell »

OK, both computers can see each other now, but I still can't share files.

FWIW, both computers see the internet no problem, and two windows boxes on the router share properly too

.... now writing this down for others looking, and for myself to google when I get lost again ...

In puppy LinNeighbourhood I found the windows box by typing the IP address by elimination into 'Add' then 'Query' and eventually windows box showed up.

In Windows I did have a different workgroup name to everything else - fixed that with 'Set up a home or small office network' wizard, then in XP Network Neighbourhood clickrd 'View workgroup computers' and puppy samba shows up.

Now the problem is I can't get into the shared dierctories. Double clicking the windows box in LinNeighbourhood doesn't do anything, and in Windows clicking the puppy server I get "\\Puppypc is not accessible. You might not have permission to use this network resource..."

Anyway, I'll try smbmount tomorrow as I've found that better than LinNeighbourhood in the past, and I'll try your config as well.

DB

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#7 Post by disciple »

BTW For connecting to Windows shares from Puppy pnethood is much more convenient. I just mentioned LinNeighborhood because if it is set up right it appears to browse the network in exactly the same way as Windows (instead of searching for the IP), so you can tell if it can be seen by browsing the network.

DavidBell
Posts: 132
Joined: Fri 24 Nov 2006, 21:44

#8 Post by DavidBell »

Well I can access my windows pc from puppy now, using pnethood (which seems a bit random but eventually does get through). But I still can't get to my puppy pc from windows - still "\\Puppypc is not accessible ... "

I wonder if I have permissions set right in puppy, or if it's McAffee firewall in windows 'protecting' me.

DB

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#9 Post by disciple »

try booting one of the other computers up with Puppy, and seeing if it can connect to your "server". If it can't then the problem is definitely with your Puppy server. If it can, then the problem is the communication between Puppy and Windows.

When you say "Still", what have you done differently? Obviously the machines have been rebooted by now, but have you tried anything else? Have you tried copying my smb.conf? And both having the msdfs proxy line, and not having it?

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#10 Post by HairyWill »

DavidBell wrote:Well I can access my windows pc from puppy now, using pnethood (which seems a bit random but eventually does get through).
Try increasing the timeout parameter to nbtscan on about lines 51 and 53 of /usr/local/apps/pnethood/pnethood (assuming you are using 0.5). I was considering making this user configurable.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

DavidBell
Posts: 132
Joined: Fri 24 Nov 2006, 21:44

#11 Post by DavidBell »

Hairywill, I increased the first parameter from 1000 to 3000 in both lines.

It still misses some servers in the 'scanning network' bit at the start, but if you keep hitting refresh it does find them all.

I think it lists all the shared folders for each server properly, but often when you hit 'connect' it crashes, sometimes you can kill the process, other times you have to restart X with Ctrl-Alt-Backspace.

DB

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#12 Post by HairyWill »

David
To keep your input connected to pnethood I have replied in the pnethood thread. Thanks for your report, sounds like an interesting one.
http://www.murga-linux.com/puppy/viewto ... 232#173232
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#13 Post by disciple »

Are you making any progress sharing files from Puppy?

DavidBell
Posts: 132
Joined: Fri 24 Nov 2006, 21:44

#14 Post by DavidBell »

Hi Disciple, I'm still messing around with it, actually haven't had much time the last week or so. I tried a few more samba configs with no luck, also tried booting my laptop with a P2.14 disk but it couldn't see anything at all in LinNeighbourhood.

All this is because I have a VIA running puppy 2.16 that I use to play music and I really like it because it's not being interupted with windows alert and alarm noises all the time. But Windows is still my main OS for business stuff so I thought I could make the VIA into network storage as well, then when my windows laptop is in the network I can backup to the VIA.

Would be sweet, and it should be so simple to do, but I've hit two problems. One is the samba server, and the other is I can't get puppy to mount a USB drive on startup without me being around. It's very frustrating. I guess I will get there eventually, but linux really needs to address this simple task stuff and make it foolproof... when I do get this working I will probably never update puppy because it's just too painful and I will have forgotten the steps.

Anyway I have another computer that runs 2.16 that I will have to try with to see whether it's samba or windows messing me around, but it's a bit of a hassle to move and so forth, so maybe next weekend.

Thanks anyway. DB

lurahxp
Posts: 17
Joined: Wed 28 Nov 2007, 07:01
Location: indonesia, jawa tengah,jawa barat
Contact:

can't explore shared puppy from wind

#15 Post by lurahxp »

iHi
i almost give up to make share puppy
i can see puppypc in my windows
but i can not explore
so,i try type

Code: Select all

smbclient -L puppypc
Password:
Domain=[WORKGROUP OS =[UNIX] server=[Samba 3.0.25b]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

would you help me?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#16 Post by disciple »

Please post your smb.conf
You might also like to mention which Puppy version you are running and which Samba package you installed

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#17 Post by disciple »

this SAMBA troubleshooting guide says
A message that warns of an invalid or bad network name could mean that the tmp service on the Samba server isn't correctly configured.
I have no idea what the tmp service is, but do you actually want to have to log in with a user name and password?

lurahxp
Posts: 17
Joined: Wed 28 Nov 2007, 07:01
Location: indonesia, jawa tengah,jawa barat
Contact:

ok.i will post samba.conf

#18 Post by lurahxp »

i wil post samba.conf
sorry i can't read this forum quickly and then practice because i don't have acces internet.ok thanks

lurahxp
Posts: 17
Joined: Wed 28 Nov 2007, 07:01
Location: indonesia, jawa tengah,jawa barat
Contact:

my smb.conf

#19 Post by lurahxp »

after i post my error, i try change password root . then my puppy when booting asking pasword. i dont know pasword. so i try instal fresh pupy
1. i instal samba 3.0.25b
2. i copy to rc.samba to /lib ( i foregt where i get this information)
3. this my smb.conf


[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 try type
# /etc/rc.d/rc.samba start
Starting Samba: /usr/sbin/smbd -D
/usr/sbin/smbd: error while loading shared libraries: libdm.so.0: cannot open shared object file: No such file or directory
/usr/sbin/nmbd -D

then i type (i forget where i get this way)

# ln -s /lib/libddm.so.0.0.4 /lib/libdm.so.0
ln: creating symbolic link `/lib/libdm.so.0': File exists
#

please help me :) because i very newbi

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#20 Post by disciple »

OK, firstly is your libdm problem sorted out?
If you still get that error message, browse to /lib and make sure libdm.so.0 and anything it is linked to have their permissions set to executable. (There is an option to set the permissions when you right click on them)
If they are already set to executable, or if libdm.so.0 is a broken link, delete libdm.so.0, and create it again as a link to libddm.so.0.0.4
(The ln -s command was to make libdm.so.0 as a link to libddm.so.0.0.4, just like making a link by right clicking in ROX, but you got an error because libdm.so.0 already existed and that command won't automatically overwrite it).

Post Reply