Hello
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. https://openwrt.org/docs/guide-user/services/nas/ftp.overview
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.
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...
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:
newuser:*:1000:65534:newuser:/var:/bin/false
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.
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.
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:
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
Run:
passwd newuser
Replace newuser with the user name you want in all commands