Digressing for a moment to “level set”, I begin by making this statement.
“ALL MICROSOFT and APPLE MACHINES COME STANDARD AS LAN SERVER MACHINES.
This means that they ALL have the ability to share stuff that they have with any other PC on the LAN. They are pre-built to work in a sharing community with other computers. When a machine has the ability to share something it has with its community, it is known as a “server”; so, whether you knew this or not, using Microsoft from Win95 to today or any Apple since 1998, you have been running a server allowing you to share any content on your PC in a meaningful way with your other PCs in your home!”

Now that we understand this, we now know what I am referring to whenever you see the word “server”. The sole function of SAMBA is to allow your Puppy machine to implement sharing in a manner that you deem appropriate for how you want it to exist on your LAN. Now, that was a mouthful to simply say, SAMBA will let you share something on your LAN and SAMBA will go further by letting you MANAGE all kind of things on your LAN, beyond simply sharing something.

Important Note:If you have a modern Puppy distro (2014) look at this thread for possible distro-unique information. That thread intends to share information embracing the newer SAMBA Version 4 that replaces this thread's discussion of version 3.

This thread for Puppy users is ONLY going to get you started; "simply and easily".
It intends to get you a base understanding of what you have to do to begin sharing stuff you have with your community. I will make my Puppy share stuff the same as what my Windows PCs have been doing with each other over the years. It is not intended to address security or advance use. Simply, a starting point for anyone new to using Linux, to share folders same as Microsoft.

Some of you may find this a little too English language or elementary. But, I do NOT intend to be overly technical here. This document is aimed at simple Windows users who knows very little Linux, yet, this document may be found to be useful to long time Linux users, as well.

Let’s dive right in by starting with a Requirements definition.
BTW: If you have a modern Puppy distro (2014) look at this thread for possible distro-unique information.

Requirement: I want to share a folder of stuff with everyone on my LAN. For starters, I do not need to add additional users on the Puppy server other than the one(s) that come with Puppy. Finally, I am ignoring any security concerns at this point of testing SAMBA on my Puppy PCs. This will be addressed in the future.

Assumption1: That you are using Puppy 5.1.1

Assumption2: That you have already installed SAMBA 3.5.5 from either a PET or from an SFS on your Puppy.

Before starting our operation, there is 4 items of information that you must have answers to before beginning. Two of them are already answered for you and the other 2 YOU MUST DECIDE. My references here are mine and you should decide your own.

One Already Answered
The one that is already answered is the Workgroup name. Assuming you are on a LAN with Microsoft machines, they are “probably” all in the same workgroup. If not, you should put them in the same workgroup before starting this experience. Lets assume you/someone has changed Microsoft’s default workgroup name to “UseAWindowsGroup”. The workgroup name I will use for this example will be that very same name as the Windows PCs, namely “UseAWindowsGroup” for this Puppy SAMBA server to belong to.

Another Already Answered
Your Puppy 5.1.1 username and password is “root” and “woofwoof”

What are the other 2 YOU MUST DECIDE

YOU must decide what the name you want your PC to be known as, on your LAN.

And, YOU must decide what you want to share.
I want this PC to be known to all the other machines as “NewPuppy” and I want to share a folder on this system named “Downloads”.

Open a Terminal Window on your Puppy
To make these things happen, we must start a terminal session by clicking “Console” on the Puppy desktop. (Another way to open a console from your desktop is to click Menu > Utility > click the item that says “terminal emulator” or “console”.
I will use the 4 items in reverse order. So first, I will create the Downloads folder that I want to share and set its rights so that everyone can see it and write to it.

Code:

# mkdir /srv/Downloads
# chmod 1766 /srv/Downloads

Next, since I want everyone on the LAN to know this PC’s name as NewPuppy, I need to tell Linux to set that to be my hostname. (By the way, EVERY LAN machine needs a unique hostname. Therefore, for example, you should NEVER have 2 machines whose name is "puppypc")

Code:

# hostname NewPuppy

Install SAMBA on your Puppy
I am assuming that you have either already install the SAMBA SFS or, if using the LiveCD like me, you have installed the SAMBA PET(Using LiveCD; if you installed the PET, DO NOT REBOOT. There is no need to reboot to begin sharing stuff using SAMBA).

Configure SAMBA for a simple testSAMBA requires a configuration file. To get SAMBA to do what I want it to do, I will do 2 things: I will tell it what to do via its configuration file. Then I will run a test program to check if I made errors in telling it what to do.
SAMBA has one and ONLY one configuration file for EVERYTHING. It is the smb.conf and on my Puppy system, this is found in /etc/opt/samba/smb.conf. We are going to backup the one that’s there, create our own, and test it.

Your Puppy is now sharing the “/Download” with anyone who wants to use it on your LAN.

Let’s add an empty file into that Download folder

Code:

# touch /srv/Downloads/test-file.txt

Final step: Tell SAMBA you are a valid SAMBA user
This is done via SAMBA tool, smbpasswd. For MY Puppy system I will tell SAMBA to add a user named root and I will give it the same password as I use in Puppy....woofwoof. This is done in the terminal window by typing:

Code:

# smbpasswd -L -a root

You can, now, go to ANY Windows PC’s desktop and see your NewPuppy on your LAN. On Windows, open your My Network Places and you will find your SAMBA Puppy there with the name NewPuppy. And if you double-click it, you will see the “test-file.txt” file we put there.

As I said earlier, these are my names that were used. You should choose names that you like for your Puppy PC that is going to share information with the LAN community.

Personally, I’ve done this kind of thing with each Puppy I run on my LAN; i.e. install SAMBA on each with unique hostnames. Now, all of my Puppies can share and use stuff, same as all my Windows PCs can.

You (and I) have met the original requirement. Congratulations....WOOF WOOF!

To recap:

The Windows Workgroup that my Puppy joined is “UseAWindowsGroup”

My Puppy PCs name is “NewPuppy"

The folder I want to share with my LAN community “/Download”

My valid Puppy SAMBA username is “root” and password is “woofwoof”

We told SAMBA using the above items ‘what to do for this PC’.

Note1: While on any other LAN PC and trying to connect to this Puppy, I always give the username root and the password woofwoof.
Note2: This example uses /srv/Downloads because, according to the Filesystem Hierarchy Standard (FHS), “/srv” is where site-specific data should be served. Technically Samba shares can be placed anywhere on the filesystem as long as the permissions are correct, but adhering to standards is recommended.

Important Note: If you have a modern Puppy distro (2014) look at this thread for possible distro-unique information and SAMBA version 4 which replaces SAMBA version3.

(Thanks goes out to Mobeus for the contribution that he made while under a severe time-crunch and pressure from his full-time job. He has been the inspiration as he saw the need and helped all of us by addressing it. And also to Shinobar, for his work as well, for addressing this need for all of us.)_________________Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Enginesor use DogPileLast edited by gcmartin on Wed 04 Mar 2015, 16:04; edited 11 times in total

I like to add a tip to start up samba automatically at the booting up Puppy.
Three points:

hostname: Edit the file '/etc/hostname', replace 'puppypc' to the machine name you decided like 'NewPuppy'.

Startup script: Place some script to start up samba in the directory '/etc/init.d'. Say the name '/etc/init.d/smb'.
It is called as 'smb start' at the Puppy boots up, and called as 'smb stop' at Puppy shutdown.

Mounting partition: Make some mounting measure if the shared path is under /mnt other than /mnt/home.
You can write the mounting command like 'mount /dev/sdb1 /mnt/sdb1' in '/etc/rc.d/rc.local' or in the script /etc/init.d/smb'

My SFS, samba-3.5.5-lucid.sfs (Use samba-3.0.26-3-{sfs4,sfs3}.sfs for Puppy 4.x.), has the script '/etc/init.d/smb'(attached) for the above 2-3 sake. The scripts reads the configuration file '/etc/opt/samba/smb.conf', and auto-mount the partition shared.

Notice: the shared path should be readable/writable from the samba user. If you set it as 'root', as gcmartin wrote on the top article, you need not care of.
But the smb.conf.example in my SFS is the user 'spot' as the default. Sharing /root/spot is no problem.
http://www.murga-linux.com/puppy/viewtopic.php?t=60836

smb.gz

Description

A sample of the start up script, '/etc/init.d/smb'.You need not this if you use my SFS, samba-3.5.5-lucid.sfs or samba-3.0.26-3-{sfs4,sfs3}.sfs.Modification required if you use this for another buils of PET or SFS.

First of all I would like to thank you for this great guide. With it I could set up Samba 3.5.5 with shinobars and gcmartins explanations without much fuzz! But one thing I couldn't figure out (I'm using Puppy 5.1.1):
A mounted NTFS USB drive (sdb1) cannot be accessed by either an Ubuntu (Lucid) or Windows (XP) computer, which are in the same subnet. If I attach a FAT32 USB drive, everything is fine.
The corresponding log shows:

The shared storage should be both readable and writable by the user.
As for the Windows partitions(ntfs/vfat), it should be mounted with the owner is the user.
The script /etc/init.d/smb does it automatically.
A trap is the partition are better to be mounted by this script, means it should not be mounted before. So you cannot boot up Puppy from the shared (ntfs or vfat) partition because it is owned by 'root' in the case.
Another trap may be the user 'nobody'. I recommend user 'spot' or 'ftp'.

The shared storage should be both readable and writable by the user.
As for the Windows partitions(ntfs/vfat), it should be mounted with the owner is the user.

It is readable/writable, when looking at the flags. I'm using your script for mounting- so when puppy started, (and samba as well) the sdb1 drive is mounted by your script.
I intend to use that drive for data, not for puppy.

Quote:

Another trap may be the user 'nobody'. I recommend user 'spot' or 'ftp'.

So I will look into the users again

Quote:

BTW, Are you sure you are using samba-3.5.5-lucid-1.sfs?

Yes, I'm positive, since I do have a frugal installation, your sfs file is mounted in /mnt as
+mnt+home+samba-3.5.5-lucid-1.sfs
I'll fiddle around some more- but even if I don't get it running with that specific drive - (my Fat32 USB drive works perfectly with Samba) - I'm very pleased with the Samba Pet.

P.S. Question: What Puppy distro did you install your SAMBA to? Thx._________________Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Enginesor use DogPile

A mounted NTFS USB drive (sdb1) cannot be accessed by either an Ubuntu (Lucid) or Windows (XP) computer, which are in the same subnet. If I attach a FAT32 USB drive, everything is fine.
The corresponding log shows:

So I used the advices of shinobar and gcmartin but the final solution was the line

Quote:

force user = root

I could copy and remove data to the drive without any problems. I dimly remember that I have read something about NTFS and linux and problems due to security...
Now I'm not really sure if I compromise my system by allowing everyone to become root...

Now I'm not really sure if I compromise my system by allowing everyone to become root..

In this example, as you show, you have told SAMBA that for this share [schmakmu], to let a user named "root" to have access to it. In other words, you have given ONLY the root SAMBA user the priviledge to ONLY this share....not to your Linux system. SAMBA did what you told it to; and he did not and will not go beyond what you told him.

Another important thing to remember is SAMBA users are separate users from Linux system users. So, if you want /need, you can create additional SAMBA users and also give those IDs access to this share as well. That way, by looking thru the SAMBA log, you can see which LAN user accessed this share and when.

Hope this helps.
Any other concerns, post them and we'll help._________________Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Enginesor use DogPile

Another important thing to remember is SAMBA users are separate users from Linux system users. So, if you want /need, you can create additional SAMBA users and also give those IDs access to this share as well. That way, by looking thru the SAMBA log, you can see which LAN user accessed this share and when.

Could you confirm this? It's been my experience that a username must already exist as a Linux user before it can be created as a Samba user. Otherwise, the server won't know whether the user has the requisite privileges to access a share.

Could you confirm this? It's been my experience that a username must already exist as a Linux user before it can be created as a Samba user. Otherwise, the server won't know whether the user has the requisite privileges to access a share.

in Linux, full SAMBA as I have created the smb.conf where there is NO LDAP server or PDC (and version 4 full SAMBA with AD), SAMBA authentication does NOT require ANY comparative Linux user. Always has been this way as far as I remember.

Hope this helps.
P.S. I haven't tested this in Puppy, though, but it should be the same.

Edited: I believe I withdraw my comments about SAMBA users and Linux users. Although I seem to remember the user systems as being distinct, it appears that there IS A RELATIONSHIP which @Rcrsn51 more accurately references...thanks

See this document for a VERY GOOD EXPLANATION on SAMBA USERS. There are many many other useful SAMBA documents on the internet as well._________________Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Enginesor use DogPile

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum