Tuesday, 21 August 2012 10:07

TP-LINK TL-WR1043ND router as a Samba File Server

Samba is a free software re-implementation of the SMB/CIFS networking protocol, Samba provides file and print services for various Microsoft Windows clients.

First, this assumes that you already have OpenWRT installed. Read this article if you haven't upgrade firmware to OpenWRT.

Second, you must have a working USB flash drive attach to router. Read here for installing USB flash drive.

 
 
 Install Samba
SSH to router and install Samba package as shown in figure below.
opkg update
opkg install luci-app-samba

Install Samba

 

Start Samba on Boot  

/etc/init.d/samba enable
/etc/init.d/samba start

 

Login to router, notice that the Services tab is added to the memu of OpenWRT. Fill in required information as shown in figure below. 

OpenWRT Network Share

* We will create two user accounts for Samba, so we enter user1.user2 to the Allowed users box

 

Samba Global Section

Samba Global Section

 

 

Setting Folder Permission

/Home folder must be set to full read write permission since it is the share folder for Samba users. Login router with WinSCP and follow pictures below to finish setting folder permission.

WinSCP Login Screen

WinSCP Folder Properties

WinSCP Setting Folder Permission

  

 

Create new user accounts

We must create Samba users for network sharing, so we need to edit the passwd file which is resided in /etc folder of router.

Login to router with WinSCP as shown in figure below

WinSCP Login Screen

 

Locate /etc folder of router, right click passwd file and select Edit as shown in figure below.

Edit passwd configuration file

 

Lets add two users by append two lines at the end of the passwd file as shown below.

Read here for more about passwd file. 

root:$1$TIzVNa/T$s6lwmc9IlikNDIEb3iUs1.:0:0:root:/root:/bin/ash
daemon:*:1:1:daemon:/var:/bin/false
ftp:*:55:55:ftp:/home/ftp:/bin/false
network:*:101:101:network:/var:/bin/false
nobody:*:65534:65534:nobody:/var:/bin/false
user1:*:1000:65534:user1:/home:/bin/false
user2:*:1001:65534:user:/home:/bin/false

 

 

Change passwords for user1 and user2

[email protected]:~# smbpasswd user1 password1
[email protected]:~# smbpasswd user2 password2

 

Browse the Share Folder

  • Click Start -> Run from Windows XP
  • Enter \\openwrt since we use openwrt as the host name
  • Or you can enter \\192.168.1.1 (the router IP address)

Browse the share folder

Read 24656 times Last modified on Monday, 07 October 2013 23:07

Leave a comment

Back to Top