Removing the info share
From NAS-Central Buffalo - The Linkstation Wiki
(→With a perl script) |
(→With sed) |
||
| Line 15: | Line 15: | ||
getting access with acp_commander!! | getting access with acp_commander!! | ||
===With sed=== | ===With sed=== | ||
| - | sed '/^\[info\]/,+6 d' | + | sed '/^\[info\]/,+6 d' |
| + | |||
| + | Or: | ||
| + | |||
| + | cp /etc/samba/smb.conf /etc/samba/smb.orig | ||
| + | sed '/\[info\]/,/guest ok = yes/d' /etc/samba/smb.orig > /etc/samba/smb.conf | ||
| + | |||
| + | Paste that after line 20 in the /etc/init.d/smb.sh - info share is removed on restart, and every restart thereafter. | ||
| + | |||
===With a perl script=== | ===With a perl script=== | ||
'''Sources:''' | '''Sources:''' | ||
Revision as of 00:24, 22 April 2007
Contents |
Why this article?
On the original and modified stockfirmwares we always have a some default shares. The normal "share" is not the problem, but "info" is as you cannot get rid of it. This article describes how to deal with that problem.
LS1/LS2/HG/HS with Openlink
Description of the mechanism
mkcode!!
Solutions
Automatic removal of the info share
Disabling updating of smb.conf
there already is another article about this!
LSPro/LSLive with stock or modified stock firmware
Description of the mechanism
nas_configgen!!
Solutions
getting access with acp_commander!!
With sed
sed '/^\[info\]/,+6 d'
Or:
cp /etc/samba/smb.conf /etc/samba/smb.orig sed '/\[info\]/,/guest ok = yes/d' /etc/samba/smb.orig > /etc/samba/smb.conf
Paste that after line 20 in the /etc/init.d/smb.sh - info share is removed on restart, and every restart thereafter.
With a perl script
Sources:
http://search.cpan.org/~sscotto/File-Samba-0.03/lib/File/Samba.pm
http://search.cpan.org/~gaas/Data-Dump-1.08/lib/Data/Dump.pm
Install:
Extract tarball ([1]) to /
Add the following line to "/etc/init.d/smb.sh" after "/usr/local/sbin/nas_configgen -c samba":
/usr/local/bin/removeinfoshare.pl
Configure SMB through the WebUI as normal.
Tarball Contents:
/usr/local/lib/perl5/5.8.8/Data/Dump.pm
/usr/local/lib/perl5/5.8.8/File/Samba.pm
/usr/local/bin/removeinfoshare.pl
removeinfoshare_readme

