How to Use Samba-TNG Server in Puppy

How to do things, solutions, recipes, tutorials
Message
Author
rmcellig
Posts: 965
Joined: Sat 19 Nov 2011, 15:18
Location: Ottawa Ontario Canada
Contact:

#106 Post by rmcellig »

Works fine in Precise 5.4.3. I am so happy that I finally have Samba working in every Pup I have tried!!! Well done.

http8000
Posts: 2
Joined: Mon 15 Jul 2013, 16:04

Printer Sharing without X

#107 Post by http8000 »

Hi,

Thanks for this post at first, it works fine for me so far.

Just if I boot without X (nox in GRUB) the Printer commands are not forwarded form samba to CUPS.
Same also happes if I boot with X and then close the X environment.

Samba is still running (I can access my shared files from Windows PC)
CUPS is running (I can print via lp command)

There is no error on Windows when printing, just the printer is not printing.

I'm using Precise Puppy 5.6.1

Is there anything in this System which depends on a running X environment?

Thanks!

Regards,
Thomas

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

#108 Post by rcrsn51 »

Welcome to the forum.

I don't know if I have ever looked at this scenario, so I will have to set up some test equipment.

What kind of printer do you have? Are you using the Windows driver?

First, I wonder if this is a CUPS issue instead of a Samba issue. Temporarily shut down the Samba server and make your printer sharable through CUPS as described here. Does it work in a non-X environment?

Or you could try the p910nd print server as discussed in the Samba-TNG how-to. I doubt if it cares what environment you are running.

http8000
Posts: 2
Joined: Mon 15 Jul 2013, 16:04

#109 Post by http8000 »

Hej,

I have a Samsung SCX 4600.
I used the printer drivers provided by Samsung (Unifyed Printer drivers http://www.samsung.com/at/support/model ... nload=true )

Yes sharing via CUPS & http works fine also in the commandline.
I'll use this for now. I just wanted to use Samba because its maybe a bit easier to connect from Windows and there are no problems with IP changes.

Maybe I try to use p910nd tomorrow. Where do I find this how-to?

Thanks for this quick answer!

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

#110 Post by rcrsn51 »

I cannot duplicate your problem. I set up the Samba-TNG server in Precise and attached an Epson USB printer.

I rebooted using "pfix=nox" to a command prompt and started the server. I checked with "ps" that all 10 daemons were running.

I booted a Puppy client machine and installed the printer using the "smbw" protocol. It worked fine.

I booted Win7 and installed the printer using the TNG instructions. It also worked fine.

I have no idea why your experience would be different.

The instructions for p910nd are on Page 1 at the end of the main post. But it is also based on the IP address.

rmcellig
Posts: 965
Joined: Sat 19 Nov 2011, 15:18
Location: Ottawa Ontario Canada
Contact:

No samba shares

#111 Post by rmcellig »

For some reason it says no shares in pnethood samba shares. Any idea why? I can see music in pnethood but it says no shares. I don't have the firewall running. I stopped and started samba based on the instructions above.

I'm checking this on the same computer I have the smb.conf file. This file resides in usr/local/samba/etc

Update:
I see the share on my other machine. looks like it is working. Why don't I see them on the native machine?

Code: Select all

[global]
dns proxy = no
max log size = 50
domain master = no
domain logons = no
workgroup = pupgroup
netbios name = music
server string = Puppy Samba-TNG Server
security = user
;map to guest = Bad Password
;printcap name = cups
load printers = yes

[pupshare]
path = /mnt/home
writable = yes

[printers]
path = /tmp
printable = yes
guest ok = yes


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

#112 Post by rcrsn51 »

You never said what Puppy you are using, so I tested this in Lupu 528.

1. I started the Samba-TNG server with the default smb.conf.

2. I ran Pnethood on the same machine.

3. It detected and mounted the share.

rmcellig
Posts: 965
Joined: Sat 19 Nov 2011, 15:18
Location: Ottawa Ontario Canada
Contact:

#113 Post by rmcellig »

I'm also using lucid 528.

toronado
Posts: 95
Joined: Wed 04 Sep 2013, 21:09

creating a share

#114 Post by toronado »

I have Samba-TNG working in lupu528. I created a user named "ps07wa" that is the same as my Windows user account. I can access the pupserver server and read/write to the path /mnt/home/ps07wa from the Windows box.

I'm trying to access a share called "pupshare1" on a different HDD in the puppy box. It shows up in Windows, but when I try to access it, Windows says it cannot find the path "\\PUPSERVER\pupshare1".

Here is my smb.conf file:

Code: Select all

[global]
dns proxy = no
max log size = 50
domain master = no
domain logons = no
workgroup = workgroup
netbios name = pupserver
server string = Puppy Samba-TNG Server
security = user
;map to guest = Bad Password
;printcap name = cups
load printers = yes

[pupshare]
path = /mnt/home
writable = yes

[printers]
path = /tmp
printable = yes
guest ok = yes

[ps07wa]
path = /mnt/home/ps07wa
writable = yes
valid users = ps07wa

[pupshare1]
path = /mnt/sdd1/pupshare1
writable = yes
valid users = ps07wa
Edit: Also, in samba-autostart when would I want to use mount /dev/ vs mount /mnt/ ? Or do i need to have both in the same line?

Edit(2):
I have discovered that they both need to be there in the same line (just as shown in the commented-out sample line).
This works for me:

Code: Select all

mount /dev/sdd1 /mnt/sdd1
Last edited by toronado on Sun 20 Oct 2013, 21:20, edited 1 time in total.

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

#115 Post by rcrsn51 »

Do you have partition sdd1 mounted?

What filesystem is on sdd1?

Try this

Code: Select all

[pupshare1]
path = /mnt/sdd1/pupshare1
writable = yes
valid users = ps07wa
force user = root

toronado
Posts: 95
Joined: Wed 04 Sep 2013, 21:09

#116 Post by toronado »

rcrsn51 wrote:Do you have partition sdd1 mounted?
Yes.
rcrsn51 wrote: What filesystem is on sdd1?
NTFS
rcrsn51 wrote: Try this

Code: Select all

[pupshare1]
path = /mnt/sdd1/pupshare1
writable = yes
valid users = ps07wa
force user = root
This fixed it. Thanks!
Last edited by toronado on Sun 20 Oct 2013, 21:44, edited 2 times in total.

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

#117 Post by rcrsn51 »

Excellent. Here is why it works. The ps07wa user you created is a non-root user. But an NTFS partition has no sense of Linux ownership and permissions. So the only user that can access it is root. By forcing the Samba server to access the share as root, ps07wa can see it from Windows.

toronado
Posts: 95
Joined: Wed 04 Sep 2013, 21:09

#118 Post by toronado »

rcrsn51 wrote:Excellent. Here is why it works. The ps07wa user you created is a non-root user. But an NTFS partition has no sense of Linux ownership and permissions. So the only user that can access it is root. By forcing the Samba server to access the share as root, ps07wa can see it from Windows.
I'm having problems with permissions on NTFS shares. Still testing and not sure what the problem is yet. Sometimes it works fine, and other times it does not.

I have a feeling that sometimes the partition is getting mounted as read-only in Puppy, because if I go into Puppy, stop the server, unmount the partition, re-mount it and restart Samba, it works.

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

#119 Post by rcrsn51 »

toronado wrote:I have a feeling that sometimes the partition is getting mounted as read-only in Puppy
How are you mounting the share? Through samba-autostart? Using what mount command?

toronado
Posts: 95
Joined: Wed 04 Sep 2013, 21:09

#120 Post by toronado »

rcrsn51 wrote:How are you mounting the share? Through samba-autostart? Using what mount command?
Mounting through Samba-Autostart

Code: Select all

mount /dev/sdc4 /mnt/sdc4
I've tested a few times and I'm finding that if I just let Samba-Autostart mount it, I won't have write permissions to that share from the Windows box. But if I go into Puppy and manually un-mount and re-mount sdc4 then it works fine.

Linux partitions for Samba shares seem to mount and work fine with samba-autostart mounting them. One thing though... I find that even on Linux partitions, I must have "force user = root" on the share (in smb.conf) because otherwise I won't have write permissions from Windows to that share.

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

#121 Post by rcrsn51 »

Because this is an NTFS partition, try this mount command instead.

Code: Select all

ntfs-3g /dev/sdc4 /mnt/sdc4

toronado
Posts: 95
Joined: Wed 04 Sep 2013, 21:09

#122 Post by toronado »

rcrsn51 wrote:Because this is an NTFS partition, try this mount command instead.

Code: Select all

ntfs-3g /dev/sdc4 /mnt/sdc4
This works. Thanks.

toronado
Posts: 95
Joined: Wed 04 Sep 2013, 21:09

mounting shares

#123 Post by toronado »

Does it make any difference, as far as Samba-TNG is concerned, whether commands to mount shares are in rc.local or samba-autostart ?

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

#124 Post by rcrsn51 »

Maybe. If the share was on something like an external USB drive, you might need to wait until Startup to ensure that it was properly detected.

toronado
Posts: 95
Joined: Wed 04 Sep 2013, 21:09

#125 Post by toronado »

rcrsn51 wrote:Maybe. If the share was on something like an external USB drive, you might need to wait until Startup to ensure that it was properly detected.
OK, thanks.

Post Reply