Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

***GUIDE*** How to have SMBv1 for old Printers/Scanners/MFP without activating it in UnRAID

Featured Replies

I was configuring a couple of old Multi-function printers today and realized they couldn't talk to UnRAID shares because by default, UnRAID doesn't have SMBv1 enabled (Netbios) and for good reason.

 

Some printers can do FTP but that's a different can of worms. So, I figured I could dockerize Samba, set it up for SMBv1 and then, using a script, copying the files from there to an UnRAID share that network users can use.

 

Note: I'm looking into presetting all this up and publishing it in Community Applications since there's no Samba docker already there but, in the meantime, you can follow these steps if you want to test it out. Suggestions are welcomed.

 

Follow these steps:

  • Create a Share in Unraid and name it "z_SMBv1" ("z_" is so it's at the end of your list). Set Export to "Yes (Hidden)" and Security to "Private". Do not give any user access. This share is our mount point for the container.
  • Create a Share in Unraid and name it "Scans". Set Export to "Yes" and Security to "Private". Give access to whatever users you want to be able to access the scanned files from their PCs.
  • Go to Dockers in UnRAID and click on "Add Container". Name it whatever you like (I've named it "SMBv1_Printers").
  • Set "Repository" to "dperson/samba"
  • Give it its own Fixed IP address ("Custom" under "Network Type").
  • Click on "Add another Path, Port, Variable, Label or Device".
  • Select "Path" as the Config type. Name it "Local Storage".
  • Container Path: /scanssmbv1
  • Host Path: /mnt/user/z_SMBv1/
  • Click on Save.
  • Click on "Add another Path, Port, Variable, Label or Device".
  • Select "Variable" as the Config type. Name it "USER".
  • Key: USER
  • Value: USER_OF_YOUR_CHOICE;PASSWORD_OF_YOUR_CHOICE
  • Click on Save.
  • Click on "Add another Path, Port, Variable, Label or Device".
  • Select "Variable" as the Config type. Name it "SHARE".
  • Key: SHARE
  • Value: scanssmbv1;/scanssmbv1;yes;no;no;USER_OF_YOUR_CHOICE_SPECIFIED_EARLIER
  • Click on Save.
  • Click on "Add another Path, Port, Variable, Label or Device".
  • Select "Variable" as the Config type. Name it "SMB".
  • Key: SMB
  • Value: disable
  • Click on Save.
  • That's it. Save and apply the container.
  • Once it starts up, go to your Printer/Scanner/MFC and tell it to send files to the docker container we just created: "CONTAINER_IP/scanssmbv1" and give it a try.
  • You can also try the share on a PC first if you want to make sure it worked. If you have write permission errors, you can use the "Docker Safe New Perms" option under "Tools" in Unraid. This should fix that issue.
  • Now, install the "User Scripts" app from Community Applications.
  • Go to Settings within said app.
  • Click on "Add New Script"
  • Name it whatever you like.
#!/bin/bash

SOURCE_DIR="/mnt/user/z_SMBv1"
DESTINATION_DIR="/mnt/user/Scans"

# Copy files from source to destination and delete from source afterwards
rsync -a --ignore-existing --remove-source-files "$SOURCE_DIR/" "$DESTINATION_DIR/"

 

  • Save the script.
  • Set the "Schedule" to "Custom".
  • On the Cron tab, add 5 asterisk (like this: * * * * *)
  • This script will move the scanned files from the SMBv1 Container share to the Scans Share and delete the source files every 60 seconds (this is the max amount of time you'll have to wait before seeing your scan in the Scans folder).

 

That's it. In theory, you can now use your old multi function printers or scanners that have a Scan-to-file/network option without explicitly enabling SMBv1 in your UnRAID.

 

In theory, obviously, this can work for any device that requires SMBv1 (the idea that led me to set this up to test, originally came from someone that had a Sonos device that wanted to read music files from an SMBv1 share from Unraid) so you can modify this accordingly.

 

You can even get fancy and if you have multiple printers, add folders within the SMBv1 share and the Scans share and change the settings accordingly (this is what I did). You can also add more shares if needed.

 

More info on samba variables to achieve other options here -> https://github.com/dperson/samba

image.png.57b119d6753b9ac61148357632da3ffe.png

 

image.png.4dd29514009e6a23bd98d02077ae31f8.png

 

image.thumb.png.304e8551a5ad30999eb0b8ef0bf91b4e.png

 

image.png.508e6bb37ef81c4b5fe72fbfd85178fc.png

 

image.png.ea46ab060e289b5064968affcdc72441.png

Edited by Soundwork
typo in code

  • 2 months later...

guessing its your docker i found on dockerhub/github? these variables work for that? 

 

tried your guide but it says "/usr/bin/samba.sh: line 160: $2: unbound variable" and the container won't start

Edited by letrain

  • Author

Hi @letrain,

 

Correct, I replied through there basically saying that I meant to keep that container private as it wasn't complete yet. As mentioned in the guide, you can use dperson's samba container for this -> https://github.com/dperson/samba

 

Can you share your settings so I can figure out where your issue is?

I used to use the dperson/samba container but it stopped working for my usecase in recent unraid versions as unraid's kernel dropped support for NTLMv1.

Had to move to a tiny Alpine VM.

It's possible it works again but I haven't retried, or that it's OK for printers.

Edited by Kilrah

  • Author
8 minutes ago, Kilrah said:

I used to use the dperson/samba container but it stopped working for my usecase in recent unraid versions as unraid's kernel dropped support for NTLMv1.

Had to move to a tiny Alpine VM.

It's possible it works again but I haven't retried, or that it's OK for printers.

 

As far as I can tell, it's still working (my initial use case scenario is still in production and it's being used actively).

On 2/4/2024 at 10:32 PM, letrain said:

guessing its your docker i found on dockerhub/github? these variables work for that? 

 

tried your guide but it says "/usr/bin/samba.sh: line 160: $2: unbound variable" and the container won't start

There is a typo in the guide above,

Value: USER_OF_YOUR_CHOICE:PASSWORD_OF_YOUR_CHOICE

should have a semicolon between the USER and PASSWORD, not a colon.

  • Author
10 hours ago, JohnHedge said:

There is a typo in the guide above,

Value: USER_OF_YOUR_CHOICE:PASSWORD_OF_YOUR_CHOICE

should have a semicolon between the USER and PASSWORD, not a colon.

 

You're completely right! I've now edited so it shows correctly. @letrain hopefully this solves your issue. Nice catch @JohnHedge!

Could this work for a PS2 SMB Share?

  • Author
On 2/12/2024 at 12:47 PM, weeLz said:

Could this work for a PS2 SMB Share?

 

I'm not familiar with how PS2s work but as long as it uses SMBv1 for its protocol to access network shares, I do not see why not.

  • 1 month later...

This worked great for me! I didnt like netbios being enabled and was considering gettting a whole new printer which seemed like a huge waste. Thank you so much!!!

  • Author
On 4/6/2024 at 10:19 AM, ParkerFlyGuy said:

This worked great for me! I didnt like netbios being enabled and was considering gettting a whole new printer which seemed like a huge waste. Thank you so much!!!

 

You're most welcomed :)

On 2/5/2024 at 11:07 AM, Soundwork said:

 

As far as I can tell, it's still working (my initial use case scenario is still in production and it's being used actively).

Can confirm it works again, i'm back to container. Was broken for a few unraid versions and it seems it got fixed.

 

BTW the dperson/samba repo hasn't been maintained for 4 years, even if it's "internal" so not much to worry about security I've moved to quay.io/unixfox/samba

  • 1 month later...

Thank you... I knew straight away that it was a SMB1 issue but was at a loss on how to fix it. No obvious firmware available so I thought I wonder if any of my UnRaid peeps had a solution. You came through ..  

  • 1 month later...
  • Author
On 6/7/2024 at 12:20 PM, wil56k said:

Thank you... I knew straight away that it was a SMB1 issue but was at a loss on how to fix it. No obvious firmware available so I thought I wonder if any of my UnRaid peeps had a solution. You came through ..  

 

You're most welcomed :)

  • 8 months later...

I made a forum post that I built off of this one to get it working.

 

  • 8 months later...

You sir are an absolute gentleman and a scholar, I was trying for hours with several other guides but always got errors from my Brother Scanner. This worked INSTANTLY!!!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.