Extroot and SAMBA fail

I am trying to configure a router with external USB root (extroot) and also as a SAMBA server.
I first configure the extroot USB and everything works perfectly until the moment I install the "luci-app-samba4" package. As soon as I restart the router, the system is no longer able to boot from extroot and I lose all configuration.
I have tried several USB drives, all with identical results. I have searched for a solution but I can't find anything about it and I am not able to make the system extroot from the USB.
Does anyone know what the problem could be and how I can correct it? Is there any alternative to SAMBA4 that I can try to share the HD?

Bet Regards.

Tried disabling the samba service, and manually starting it post boot ?

if your device has not got the flash to install samba4
maybe now running out of ram
128M maybe just be enough but 256M+ is better

try swapping to a new USB stick. Sounds to me like your current stick has some issue retaining data consistently and after installing samba is getting corrupted.

Thanks, I have made two partitions on the USB, one for extroot and another for swap and I have managed to get samba4 to work. Now the "Network Shares" service loads without errors.
The problem now is that I can't add a user to be able to access the disk I have on the router from W10.
I have followed what is specified in "Per user security" of

But when creating the password it gives me the following error.

I have verified that smbpasswd does not exist in the path "/etc/samba/"

I don't know what I'm doing wrong, let's see if someone can guide me.

opkg install shadow-useradd
opkg install samba4-utils

useradd User
echo -e "Password\nPassword" | (passwd User)
echo -e "Password\nPassword" | (smbpasswd -a User)

Thanks Lucky1,

I am trying to execute the commands you indicate but when I execute:

echo -e "Password\nPassword" | (passwd User)

I get the following error.

image

The user has been created in /etc/passwd.

Can you help me with this? I can't find this information on the web...

Thank you so much.

what I posted was a script to reply password & password to command passwd User
so just use "passwd ricca"
this creates a user called ricca
then ask you to enter and reenter its password
then use the command "smbpasswd -a ricca"
this ask to add a samba password to that same user for samba

Thanks Lucky1,

I have tried to follow the steps you indicated but there is no way, I don't know what I did wrong.
I have managed to change the password, but when executing:

smbpasswd -a ricca

I get an error again.

I have tried updating samba4, I have uninstalled it and installed it again and it has not worked.
Finally I reset the router and installed everything from scratch with the same result.

Any idea?

Thank you so much.

I'll try and start this again
you need to make a user in openwrt
to do this install shadow-useradd via "opkg install shadow-useradd"
add a user with "useradd ricca"
set it's password via "passwd ricca"

now you need to add a samba user
so install samba4-utils via "opkg install samba4-utils"

and to add a new user to samba "smbpasswd -a ricca"
it will add the user & ask for it's samba password

all done :slight_smile:

I am not able to make it work...
I have done a clean installation again, but when running:

smbpasswd -a ricca

I keep getting errors with some libraries

I have no idea where the problem could be.

Thank you so much.

what openwrt version are you using ?
was expecting V23.02

maybe your deice is just to under powered
you can always try KSMBD