Simply, Teaching Puppy to SAMBA (share folders to LAN users)

Configuration wizards, scanners, remote desktop, etc.
Message
Author
gcmartin

Re: Samba 3.5.6 on Lucid-Puppy 5.2.5

#21 Post by gcmartin »

mimmo wrote:... what's wrong ? any idea
Sorry for the problem(s). We are in the process in updating the manual with those corrections. Thanks (BTW you didn't mention which Puppy version you are using)

If I understand correctly, from your Windows PCs you are having problems getting to the 2 resources you are sharing from Puppy. Right?

If so, I would like you to do 3 things on Puppy and 2 normal things on Windows. This should help to get you started

Puppy
  1. Using your Editor
    • remove the last 2 lines on each resource "create mask= and force group=" (This is only temporarily while we get things working. add them back after you get things working)
  2. Using a terminal
    • Open a terminal and type testparm. (Please post those results back here.)
    • In terminal type "smbpasswd -a spot" (remember the password you set for spot)
    • In terminal, chmod 765 /root/spot /mnt/sdb1/Photo"
Windows (This assumes that you can see your Puppy PC in "Network Places")
  1. Open a command prompt and type
    • net use r: //IP address of your Puppy PC/Photo /user:spot password4spot
    • net use s: //IP address of your Puppy PC/spot /user:spot password4spot
      You should not get errors. If you do post them here
You should now be able to "see" and use those Puppy items from the Windows PC(s).

Please post your results for others.

Hope this helps

User avatar
mimmo
Posts: 19
Joined: Wed 20 Jul 2011, 06:17
Location: Versailles, France

Samba 3.5.6 on Lucid-Puppy 5.2.5

#22 Post by mimmo »

Code: Select all


# testparm
Load smb config files from /etc/opt/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[Photo]"
Processing section "[spot]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
	unix charset = UTF-8
	display charset = UTF-8
	workgroup = xxxxxxxxx
	server string = Samba Server on Puppy
	security = SHARE
	map to guest = Bad User
	null passwords = Yes
	guest account = spot
	log file = /var/log/samba/log.%m
	max log size = 50
	printcap name = cups
	dns proxy = No
	message command = /usr/local/bin/LinPopUp "%f" "%m" %s; rm %s

[homes]
	comment = Home Directories
	valid users = %S
	read only = No
	browseable = No

[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	guest ok = Yes
	printable = Yes
	use client driver = Yes
	browseable = No

[Photo]
	path = /mnt/sdb1/Photo
	read only = No
	guest only = Yes
	guest ok = Yes

[spot]
	path = /root/spot
	read only = No
	guest only = Yes
	guest ok = Yes
# 
# 
chmod 765 spot # ok (also it's a strange value for a dir)
chmod 765 Photo # did not work !!!

rebooted both puppy and window

form windows I did the commands with following syntax (got few syntax error at first) the ok/error messages are a quick translation from french

Code: Select all

>net use s: \\192.168.0.1\spot spot!! /user:spot
command executed correctly

>net use r: \\192.168.0.1\Photo spot!! /user:spot
system error 53

network path not found
s: drive OK (I can open the spot readme file find )
r: drive not present

thanks for the help
good night I'll be back tomorow :)
Last edited by mimmo on Sun 06 Nov 2011, 16:02, edited 1 time in total.

gcmartin

Re: Samba 3.5.6 on Lucid-Puppy 5.2.5

#23 Post by gcmartin »

mimmo wrote:

Code: Select all

 ... # testparm... 
...
I dont have PUP525. But, I did have a PUP528 without updates. I fired it up, added SAMBA, had to resolve PATH issues withPUP528, then define a resource and started SAMBA. Worked fine aside from the pathing issues on PUP528 Two-headed Dog

2 things,

I seem to remember somethings about Windows needing to have a service restart when this happened. To prove it, please restart Windows and REVERSE the order of "net use" requests.

ALSO I do remember reporting some issues to Playdayz on some problems with this combination of PPM SAMBA on PUP525. Something was odd about the installation of SAMBA on this Puppy.

I will follow up with you after church and family, later today. This is the only distro that I had any problems unusual problems with.

User avatar
mimmo
Posts: 19
Joined: Wed 20 Jul 2011, 06:17
Location: Versailles, France

Samba 3.5.6 on Lucid-Puppy 5.2.5

#24 Post by mimmo »

@gcmartin
many thanks,

I was wondering why I should update to 5.2.8 I think you just gave ma a good reason :D

So I try with 5.2.8 and samba 3.5.6 and ...

it failed in the exact same way spot is ok and photo is not :cry:

I didn't find the smbpasswd ! (I don't know if I realy need it)

I'm also fighting with the aliases in roxterm ...

did you try on a directory other than one under /root ?

don't want to poise your sunday :?

gcmartin

Samba 3.5.6 on Lucid-Puppy 5.2.5

#25 Post by gcmartin »

mimmo wrote:@gcmartin ...
Here's a complete installation kit for you use. Should address all short comings that you'll hit using PUP 5.2x.

PM me with any questions you might have.

Hope this helps.
Attachments
2Mimmo.tar.gz
The console log is a start to finish guide. The smb.conf file is a "SIMPLE" sample for testing to get to your Photos.
This compressed file contains a PPM listing, a SAMBA setup console list on a PUP528 with 002 update,
and a SAMBA configuratio
(82.99 KiB) Downloaded 1050 times
Last edited by gcmartin on Fri 11 Nov 2011, 07:18, edited 2 times in total.

User avatar
mimmo
Posts: 19
Joined: Wed 20 Jul 2011, 06:17
Location: Versailles, France

Samba 3.5.6 on Lucid-Puppy 5.2.5

#26 Post by mimmo »

So I followed all this and more ...

what I believe is that the problem comes when I try to have a link to a directory that is not physically under /root

for example in confd.conf I add

Code: Select all

[puppyref]
   # the path should be readable and writable by the guest account
   path = /root/puppy-reference
   read only = No
   guest ok = Yes
I do get acces to "puppyref" from my windows PC
the links are visible but cannot be followed

I tested some other cases of links from spot/ to ../puppy-reference (all under /root ) and it's not functional

Code: Select all

# pwd
/root/spot
# ls -al
total 3941
drwxr-xr-x  6 spot spot    4096 2011-11-08 21:40 .
drwxr-xr-x 59 root root    4096 2011-11-08 21:18 ..
drwxr-xr-x  2 root root    4096 2011-11-08 21:37 aRootDir
drwxr-xr-x  2 spot spot    4096 2011-11-08 21:38 aSpotDir
drwxr-sr-x  2 root root    4096 2011-11-08 21:30 .didiwiki
-rwxrw-r--  1 spot spot 4007512 2011-09-25 13:10 IMG_0001.JPG
lrwxrwxrwx  1 root root      19 2011-11-08 21:40 PUPREF -> ../puppy-reference/
-rw-r--r--  1 spot spot     580 2009-11-19 10:03 README.txt
# 

So I believe that the problem is here the links are not possible to follow
and /mnt/sdb1/Photo is kind of a link (to the drive)


to check this I also tried a direct link not under root

Code: Select all

[optsamba]
   # the path should be readable and writable by the guest account
   path = /opt/samba
   read only = No
   guest ok = Yes
and this one works find I'm perfectly able to browse the full tree of samba from windows

please try to share another mounted disk

Note:the 'smbpasswd' command now works I believe that the rehash on restart brought me that

gcmartin

Re: Samba 3.5.6 on Lucid-Puppy 5.2.5

#27 Post by gcmartin »

mimmo wrote:So I followed all this and more ...
There is a problem that I have just confirmed with Lupu528-002M. Seems to have the problem you've just described; namely multi-level directories of items in on the HDD are not able to be accessed from Windows or any other LAN PCs.

There is something very odd about what's happening with the running Live media system with Lupu multimedia ISO. And, something also is "begging" in ROX+Puppy filesystem.

Here's what's happening: Your system boots to desktop. You have some directories defined in /etc/opt/samba/smb.conf that is 3 levels deep (i.e. /mnt/sda1/somefolder.) that have been granted rights of 777 via chmod. When you start SAMBA, he starts normal without error messages. On ANY LAN PC, you try to mount the resource(s) and you DO NOT ACCESS to the resource as you expect.

Resolution:
  1. Stop SAMBA
  2. Exit to Prompt
  3. Umount the HDD resources you are trying to access
  4. Now, remount those resources
  5. restart SAMBA
  6. Go to any other LAN PC and mount the resources you had problems with before.
You will see that you can now access them.

This is NOT a problem with SAMBA. Its a problem with the running Filesytem in Puppy.

I am unclear as why this is occurring in this Puppy distro series.
Last edited by gcmartin on Thu 10 Nov 2011, 01:11, edited 1 time in total.

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

#28 Post by playdayz »

Live media system with Lupu multimedia ISO
The Multimedia ISO of 528-002 has been withdrawn. Well it was never released--it was a test vehicle. http://www.murga-linux.com/puppy/viewto ... 224#581224

I am curious to know whether lupu-528.iso (the release on AUG 7 2011) and/or lupu-528.002.iso (currently in testing) have this behavior. I am holding lupu-528.002.iso for another issue. One difference is that lupu-528.iso was created with Woof and lupu-528.002.iso (and lupu-528.002M.iso) were created by remastering. If there is a problem with remastering it would be good to know.

It would also be worth knowing whether Three-Headed Dog (luci-001) has the behavior also--it will be updated and an updated iso released in the future.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Samba 3.5.6 on Lucid-Puppy 5.2.5

#29 Post by rcrsn51 »

mimmo wrote:works find (I see the changes on the windows side)
from windows I access the readme in the spot home dir
but I have problems to acces Photo
Just for clarification:

Exactly what problems are you having?

What kind of device is sdb1? An external USB drive? With what filesystem is it formatted? Is it mounted?

Under what user name are you logging into the Samba server from Windows? As root, spot or guest?

gcmartin

#30 Post by gcmartin »

Most noticeable when you have a share define for say

Code: Select all

path = /sda1/folder/subfolder
This is where 3.5.6 on Puppy 528's having issues. It I set the share to "/sda1/folder", problem won't surface. This has occurred on both HDD/USB storage.

@Rcrsn51
Are you using Live media 528 and the PPM's SAMBA?

There are couple 528 application issues I'm seeing in Live media operation, that I wonder if somehow they MAY be related. Or maybe, there is a necessary operations step for Live media use that must be done. Thus far, no shortcuts have been taken and all installation and use is via PPM with standard desktop restarts. I have not rebooted the 528002M that i started with last week.

If you are not having these same problems with PPM and 528M please report what you are seeing. What you see/know may not just apply here, but help PUP528M as well.

Thanks in advance for any help
Last edited by gcmartin on Thu 10 Nov 2011, 18:35, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#31 Post by rcrsn51 »

The only reason I asked is because mimmo's problem with sdb1 might be related to kanehekili's on the first page.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#32 Post by rcrsn51 »

gcmartin wrote:Most noticeable when you have a share define for say

Code: Select all

path = /sda1/folder/subfolder
This is where 3.5.6 on Puppy 528's having issues. It I set the share to "/sda1/folder", problem won't surface. This has occurred on both HDD/USB storage.
Using Lupu 528 in PUPMODE=5 (ie without a save file) and Samba-TNG, I did the following:

1. created the folder /mnt/sda4/dir/subdir
2. gave ownership of subdir to spot
3. put a symlink in subdir to another location (like mimmo did in his example)
4. created a samba share for subdir with the sole option "writable = yes"
5. started the samba server
6. from a Windows client, logged in as user spot

It worked correctly. I got write access to the subdir folder and could follow the symlink.

User avatar
mimmo
Posts: 19
Joined: Wed 20 Jul 2011, 06:17
Location: Versailles, France

Samba 3.5.6 on Lucid-Puppy 5.2.5 or 5.2.8

#33 Post by mimmo »

Hi all

I have installed 528 (and 525 ) frugal on /sda6

/mnt (root:root 755)
/sdb1 is another hard drive (root:root 777) FAT32 used to be my D: drive on windows
/Photo the photo dir I wish to share (root:root 777)
all dir after Photo are (root:root 777)

on the window explorer I see the "photo" dir but when trying to open it it fails

I was able to share
- spot ( /root/spot spot:spot 755 ) with access to files
- puppy-reference ( /root/puppy-reference root:root 777 )
in this one I can read an image I have put here
I can see all the link (standard install) but I cannot follow these links (all L777 i.e. lrwxrwxrwx ) see attached
I even wrote the windows snapshot there to post it ( was created a root:root 755)

it doesn't look like a pb of plain user access right

Thanks to all hope this helps
Attachments
try_link.png
(112.07 KiB) Downloaded 1723 times

User avatar
mimmo
Posts: 19
Joined: Wed 20 Jul 2011, 06:17
Location: Versailles, France

Samba 3.5.6 on Lucid-Puppy 5.2.5 or 5.2.8

#34 Post by mimmo »

I tried (just for fun :D ) to have a complex conf

what I have is that:
- only the last drive is mounted (sda5 in this case not sda1 nor sdb1 )
- all dir are "visible" from windows but only the one on the virtual
"lupusave.2fs" are realy accessible ( spot, puppyref and optsamba )

Code: Select all

# A Simple Samba configuration file for shared strage and printer for public. 
#======================= Global Settings =====================================
[global]

# BK LinPopUp requires this
message command = /usr/local/bin/LinPopUp "%f" "%m" %s; rm %s

##
## Basic Server Settings
##

	# workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4
	workgroup = xxx


	# server string is the equivalent of the NT Description field
	server string = Samba Server on Puppy

	#BK think need to change this...
	log file = /var/log/samba/log.%m
	# Put a capping on the size of the log files (in Kb).
	max log size = 50

	# Security mode.
	;security = user
	security = share
	map to guest = Bad User
	null passwords = Yes
	guest account = spot

##
## Network Browsing
##
	# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
	# via DNS nslookups.
	dns proxy = no

##
## Printing
##
	# Assume using CUPS
	load printers = yes
	printcap name = cups
	printing = cups

   # chacter set
   unix charset = UTF-8
   ;dos charset = CP932
   display charset = UTF-8

#============================ Share Definitions ==============================
[homes]
     comment = Home Directories
     browseable = no
     writable = yes
     valid users = %S

# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment = All Printers
   user account = spot
   create mode = 0700
   # the permission of the path should be 1777
   path = /var/spool/samba
   browseable = yes
   public = yes
   guest ok = yes
   printable = yes
   # allow Windows to use its printer driver
   use client driver = yes

[puppyref]
   # the path should be readable and writable by the guest account
   path = /root/puppy-reference
   read only = No
   guest ok = Yes

[optsamba]
   # the path should be readable and writable by the guest account
   path = /opt/samba
   read only = No
   guest ok = Yes

[ancienne]
   # the path should be readable and writable by the guest account
   path = /mnt/sdb1/Photo_Ancienne
   read only = No
   guest ok = Yes


   #force group = spot
   # user root for ntfs
   #force user = root
   #public = yes
   #guest ok = Yes
   #writable = yes
   #printable = no
   #create mask = 0765

[photo]
   path = /mnt/sdb1/Photo
   public = yes
   only guest = yes
   guest ok = Yes
   writable = yes
   printable = no
   create mask = 0765
   force group = spot

[spot]
   path = /root/spot
   public = yes
   only guest = yes
   guest ok = Yes
   writable = yes
   printable = no
   create mask = 0765
   force group = spot
   
[windows]
   path = /mnt/sda1/WINDOWS
   public = yes
   only guest = yes
   guest ok = Yes
   writable = yes
   printable = no
   create mask = 0765
   force group = spot
   
[diving]
   path = /mnt/sda5/plongee
   public = yes
   only guest = yes
   guest ok = Yes
   writable = yes
   printable = no
   create mask = 0765
   force group = spot
   

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#35 Post by rcrsn51 »

The best way to debug Samba is to do the simplest thing first.

1. In the [global] section, put the security mode back to "user". That will force the client to login, so you know exactly what ownership/permissions are in effect.

2. Make your share definitions as simple as possible. All you really need is

Code: Select all

[photo]
   path = /mnt/sdb1/Photo
   writable = yes 
3. From the Windows client, login as user "root".

gcmartin

#36 Post by gcmartin »

@Mimmo, I have updated the 'kit" you were given earlier. That kit had complete steps. I never got feedback on the items in that kit from you.

@rcrsn51 and I are suggesting a very basic start before adding complexity. It makes it easy to isolate any problems when they arise. The original smb.conf was Basic. This new one in the kit is VERY BASIC


So in this update, I provide a very simple smb.conf. Please do the following and provide a WINDOWS console log this time. (This allow me to compare the results you are seeing with known issues.)
  1. Edit the smb.conf and change the workgroup name to YOUR workgroup
    Open a console and run testparm (send or post the output of testparm with ALL messages)
  2. restart samba
  3. go to WINDOWS and do the "net use" commands as were given you before. (send/post the Windows messages as well).
Provide the results of that back to this thread.

I expect you will have some success from the smb.conf file you are given in the download. SAMBA, for what we are doing, is really very simple.

Hope this helps
Edited: It just occurs to me that you MAY have something else that you have installed which is doing something that might be affecting Puppy file rights (security). Have you?

User avatar
mimmo
Posts: 19
Joined: Wed 20 Jul 2011, 06:17
Location: Versailles, France

Samba 3.5.6 on Lucid-Puppy 5.2.5 or 5.2.8

#37 Post by mimmo »

ok back to a simple test situation
my conf!
+ Puppy 5.2.8
+ Instant-Update_Lucid_528_002
+ Firefox-5.0.1-lucid525 (quick pet)
+ samba-3.5.6-lucid

no fancy stuff
I have a home network with a router no real need for firewall (the NAT block all ports)

testparm full results

Code: Select all

# testparm
Load smb config files from /etc/opt/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[puppyref]"
Processing section "[usrdoc]"
Processing section "[photo]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
 
[global]
	workgroup = xxxx
	server string = Samba Server on Puppy
	map to guest = Bad User
	guest account = root
	log file = /var/log/samba/log.%m
	max log size = 50
	dns proxy = No
	message command = /usr/local/bin/LinPopUp "%f" "%m" %s; rm %s

[homes]
	comment = Home Directories
	valid users = %S
	read only = No
	browseable = No

[puppyref]
	path = /root/puppy-reference
	read only = No

[usrdoc]
	path = /usr/share/doc
	read only = No

[photo]
	path = /mnt/sdb1/Photo
	read only = No
# 
one part which is not clear above is in smb.conf
# Security mode.
security = user
;security = share
map to guest = Bad User
null passwords = no
guest account = root


samba restart

Code: Select all

# ./smb restart
uid=0,gid=0
mount -o uid=0,gid=0 -t ntfs /dev/sdb1 /mnt/sdb1
Samba restarted.
# 
changed root password to samba

Code: Select all

# smbpasswd -a root
New SMB password:
Retype new SMB password:
# 
looks good to me

on windows side

I have do identify as root and give my pwd and...
IT WORKS
I see my photo directory content :D and all photos inside

extra notes:
+ as soon as I identified the "root" home account became visible
on windows side (I thought it wouldn't "[homes] browsable = no")
+ links don't work even if the destination is also a network mount point
++ the usrdoc is completely accessible (/usr/share/doc ) via it's
network mount point
++ while it's not by it's link inside puppyref
( /root/puppy-reference/doc -> /usr/share/doc)

alaindu22
Posts: 177
Joined: Wed 29 Jul 2009, 16:49

#38 Post by alaindu22 »

Bonjour
Il y a une discussion en français sur ce thème sur le forum de l'asri
http://asri.edu.free.fr/thread.php?lng= ... id=1&cat=2
voir la réponse 22

You can see also my pupplet (i use its in french primary school)
http://www.neufgiga.com/n/50-17/share/L ... 15bfb9e89/

I use
lampp with mysql support
mysql is ok on puppy5.25 but i have error 2002 on puppy5.28

samba-tng-rcrsn-0.5-rc1.pet : it is ok for exchange beetween puppy et windows xp
smb.conf is written with the same workgroup than microsoft's group

I have some problem with vista home and windows seven
when I want copy a file <50 ko it is ok but if the file is bigger, it is impossible to copy from vista or seven to pupshare
On vista and seven, it is possible to use upload with http to send a big file
I use lampp because it is easier for me than but i think that lhmp is better (with lhmp I have no sql error on lucid5.28) but it's necessary to modify hiawatha.conf (virtual hosts and show index)
With lhmp, It'seems (to me) also necessary to have puppy install on ext3 partition and it is not fine for me because I often install puppy with unetbootin in the school and ntfs is used on the computer with windows

Curiously I have a windows -application which is able to send big file from vista or seven to puppy share even if lampp is not installed
see http://dominique.pepoli.free.fr/Duplik.htm

see also video http://www.neufgiga.com/n/50-17/folder/43276279/
coloriage pour classe.avi
duplik.avi

So i have a new question
How to send big file from vista home to puppyshare ?

sorry for my english
Alain

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#39 Post by rcrsn51 »

@alaindu22: Just to be clear:

From XP, you CAN send a large file to pupshare?
From another Puppy machine, you CAN send a large file to pupshare?
From Vista or Win7, you CANNOT send a large file to pupshare?
Can you DOWNLOAD large files from the Samba server to a Vista client?

Unfortunately, I don't have either a Vista or Win7 machine to test this. Have you tried one of the full Samba packages instead of Samba-TNG?

Send a PM to forum member jrb. He has used samba-TNG with Win7.

Edit: Maybe this is useful. Or this.
Last edited by rcrsn51 on Fri 11 Nov 2011, 19:58, edited 3 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Samba 3.5.6 on Lucid-Puppy 5.2.5 or 5.2.8

#40 Post by rcrsn51 »

mimmo wrote: ++ while it's not by it's link inside puppyref
( /root/puppy-reference/doc -> /usr/share/doc)
I still cannot duplicate this problem. I created a share like yours.

Code: Select all

[puppyref]
   path = /root/puppy-reference
   read only = No 
and logged in through a Windows client as root. I was able to follow the links to /usr/share/doc.

While working on the SERVER machine, run Pnethood. Log into the share and see if you can follow the links.

Do you have another Puppy machine on your network that you can use as a client? Or just boot your Windows machine off a Puppy CD.

Post Reply