OpenWrt ftp and samba same username and password

I need help for using samba and ftp on openwrt for usb drive access.
I was able to create username and it was working fine for samba but same username was not working for ftp.
There are only few steps given on openwrt wiki page for FTP i was able to install ftp but only root login was working.

when i googled for samba and used first few links for my setup.
I was able to create username for samba and it was working fine and i was able to access folder in windows, but i don't know why same username was not working for FTP.

Please when you create wiki pages, please keep in mind the first time users of Linux + openwrt.
All these commands and editing config files is very confusing for first time users.
In the end i gave up and asking here for help.
I just need to access same folder on USB drive using samba and ftp. If possible same username and password other than root.
And if possible please provide me step by step instructions.

Thank you,

ok, first you should install

putty ( on windows )
nano ( on openwrt )

find two good videos on using putty and nano on youtube then come back in a day / let us know when you have practiced using them a little..

another good program I really liked in the past was WinSCP... but it may contain bloatware... so read some modern reviews / alternatives... also practice using that for a while too if you get it installed... but it's not strictly necessary...

1 Like

You need a system password for the user to be able to log in with ftp so run the command:

passwd <username>

This will allow you to set a password that will work for ftp.

1 Like

FTP as a protocol is mostly obsolete, you'd best replace it with SFTP:

I only need it for lan, So, I
think I will be OK with FTP

yes i did create username and password but only worked for samba

It doesn't really matter.
FTP, Telnet, Gopher - they have the same fate.
Beating a dead horse is pointless.

If you followed the wikis then you created a newuser and gave it a samba password, but you did not give it a password for the system, which ftp needs. If you use the command:

cat /etc/passwd

you'll see your new user most likely at the bottom of the list and if you followed the wiki instructions it will look like:


The * next to the user name represents the password and it indicates there isn't one for login. If you want to use ftp you need a login password for the system, and unfortunately a shadowed password doesn't work so you need to use the command I gave earlier to setup a password for the user.

After you run the command and give the password you want to set and you look at the /etc/passwd file the * will be replaced with a hashed version of the password.

1 Like

I know in my case I have Kodi on my xbox and it'll only connect to network shares over http, ftp and nfs, and nfs is not working on my openwrt anymore, and ftp is easy to setup.

i followed this video for samba and i added user information in 3 files like mentioned in this video



Unfortunately a shadowed password will not work with ftp on openwrt. When I tried to use a shadow password it wouldn't log in to ftp, root does, but the user I added didn't, so there is probably a way to make it work, but I couldn't figure it out.

The only step not included in the wikis for getting the user to be able to log on to ftp and samba in openwrt is:

passwd <username>
1 Like

OK i am going to try installing samba and ftp this weekend

i installed your package for openwrt and it does have nano i think.

Sorry i am late but i have installed samaba and ftp now please tell me which command to use to add user for samba and ftp?

opkg list-installed | grep samba
luci-app-samba4 - git-20.179.75976-ec03451
samba4-libs - 4.12.5-1
samba4-server - 4.12.5-1

opkg list-installed | grep ftp
atftpd - 0.7.2-3
openssh-sftp-server - 8.3p1-2
vsftpd - 3.0.3-3

please tell me which command to use to add user for samba and ftp?

add user only in this file?
To access a samba share with user level access there must be users added to the system by editing /etc/passwd

or add to all three


Sorry @neil1, I don't use ftp and don't know what's needed, was just pointing you to what @jgslade had suggested.

1 Like

From the samba wiki:

user in this example will be called 'newuser'“ (this is the loginname you need to enter, when Windows pops up the authentication dialogue)
with the unique system ID '1000'
with the group id '65534' (which is the group identifier for 'nobody'= no special default group)
'/var' just means the user will not need a special home folder on the system
'/bin/false' means the user will not have a default shell program associated

smbpasswd -a newuser

Once you have done that


passwd newuser

Replace newuser with the user name you want in all commands

1 Like
passwd newuser
passwd: no record of newuser in /etc/shadow, using /etc/passwd
Changing password for newuser
New password:

samba is working but still ftp is not working
what is this error?

/etc/init.d/vsftpd start
500 OOPS: config file not owned by correct user, or not a file