OpenWRT - Add Samba User
Prerequisite:
Steps:
- Assume SAMBA has been installed on your OpenWRT.
- Assume you have your external HDD mounted on your OpenWRT
Steps:
- Add user at OS level (reference: https://wiki.openwrt.org/doc/howto/secure.access )
- Add a new user by editing below 3 files, add new user at last line of each file, with below information (assume UID and GID 1000 is unused!):
/etc/passwd: USER:x:1000:1000:GROUP:/mnt/usb:/bin/false /etc/group: GROUP:x:1000: /etc/shadow: USER:xyzDummyString:16666:0:99999:7:::
- Change password by using passwd command:
- passwd USER
Changing password for USERNew password:
Retype password:
Password for USER changed by root - Add a Samba user with smbpasswd command:
smbpasswd -a USER
New SMB password:
Retype SMB password: - At LUCI, under "Allowed Users", enter "USER"; uncheck "Allowed Guest" for added security.
Comments