установка samba3 на DD-WRT TPLINK 1043

обновляем список пакетов

 

[cc]

opkg update
opkg install samba3

[/cc]

 

добавляем себя в passwd

 

[cc]

vi /etc/passwd

seal:$1$qQ7V93s.$nFl8JLA7C9W1qKC7p5HX71:0:0:Seal,,,:/mnt/share:/bin/false

[/cc]

 

создаем /opt/etc/init.d/adduser

[cc]

grep -q seal /etc/passwd || echo ‘seal:$1$qQ7V93s.$nFl8JLA7C9W1qKC7p5HX71:0:0:Seal,,,:/mnt/share:/bin/false’ >> /etc/passwd

 

chmod a+x /opt/etc/init.d/adduser

ln -s /opt/etc/init.d/adduser /opt/etc/init.d/S05adduser

[/cc]

 

 

создаем пользователя для samba

 

[cc]

cd /etc/samba/

touch smbpasswd

 

cd /opt/etc/samba/

/opt/bin/smbpasswd seal seal

 

cp -a /etc/samba/* /opt/etc/samba/

chmod 644 /opt/etc/samba/smbpasswd

[/cc]

 

 

создаем конфиг самбы

 

[cc]

vi /mnt/opt/etc/samba/smb.conf

[/cc]

 

[cc]

[global]

netbios name = DD-WRT

workgroup = WORKGROUP

server string = DD-WRT

syslog = 10

encrypt passwords = true

passdb backend = smbpasswd

obey pam restrictions = yes

socket options = TCP_NODELAY

preferred master = no

os level = 20

security = user

guest account = nobody

invalid users = root

smb passwd file = /opt/etc/samba/smbpasswd

unix charset = UTF-8

dos charset = UTF-8

[homes]

comment = Home Directories

browseable = no

read only = no

create mode = 0750

[USBDrive]

path = /mnt/

read only = no

guest ok = no

create mask = 0700

directory mask = 0700

[/cc]

 

продолжение следует

 

 

Источник

 

 

Оставить комментарий