![]() |
Installing Samba >=3.0.14a-4 on Unslung 4.2x beta or laterAssumptions for these instructions
I've not tested any of this on pre 4.2 releases. Install
Post-install setupFirst, copy the default samba config files over to the new samba directory:
(Please note that on OpenSlug, the config file is on /usr/lib/smb.conf (old) or /etc/samba (new)) Next, you will need to edit the /opt/etc/samba/smb.conf file so it will work with samba 3.0. If you're new to Linux editors, the vi editor which comes standard with UnSlung is very unfriendly (google "vi" to learn the basics). The nano editor ("ipkg install nano") is much more intuitive. Alternatively use your favourite editor on your favourite operating system and ftp the resulting file to the nslu2. An example smb.conf file that works is:
Another second example smb.conf file generated using the Swat utility. Optimised for Unslung firmware (added by RobHam Sept 2007). Note - for Debain firmware change the interfaces line to Also note - for non-unslung firmware, like openwrt, you need to change guest account=nobody from guest
Finally, edit /opt/etc/init.d/S08samba, remove comments:
Now you are ready to restart
If all goes well, the stock samba will stop and your new samba will start. Don't be suprised if running a "ps" shows two smbd & nmbd tasks, compared to one each previously. This is normal. (On OpenSlug, you need to use /etc/init.d/samba restart) I've tested this setup, it seems to work correctly and maintain compatibility with the Linksys web interface and the Storage Link windows tray app that mounts USB Memory sticks when inserted into slot 2. From FVH: On my setup (Unslung 5.5 with Samba 3.0.21) the following diversion scripts / update tricks were not required. Samba 3 functions correctly after reboots. Getting Samba 3 running was literally as simple as: ipkg update ; ipkg install samba ; create /opt/etc/samba/smb.conf ; edit /opt/etc/init.d/S08samba. Then restart. That's all. Update: Thanks to Inge Bjørnvall Arnesen Diversion scriptYou will find that the smb.conf file does stick and revert to orginal during a turn off/turn on... You have to set a diversion script in /unslung Create a file rc.samba to include the below
Alternate Update MethodWhen rebooting the system the file smb.conf will be overwritten with the original samba 2 version. To keep the version 3 file, you need a copy of it in a location where it will not be touched. The best spot for this is /unslung Once you have created your smb.conf, you will need to remove the link to the old file and and point to the new file with a diversion script. rc.samba
This should allow you to fully use the web interface, keep both file locations intact and not have to start the v2 server before starting the v3. Alternate update method 2After each reboot, the smb.conf and smbpasswd files in /opt/etc/samba directory are overwritten. Having a look closer, you can see that :
No script is required (that's why I think it's easier than writing a diversion script). Just type the following commands :
and then only I update the /opt/etc/samba/smb.cong file as shown below. Be aware of ipkg upgrade of samba package to 3.0.14a-5. It may break your existing samba configuration and make files unsharable. Make sure you edit the "hosts allow = 127.0.0.1 10.0.0. 10.0.1. 10.0.2." section to include your network. sample:
Alternate update method 3I created the smb.conf file in /opt/etc/samba and started the slug. There was no need for a diversion script. Running Unslung 6.8 and samba 3.0.25a If your users can´t connect to their shares and you see errors like "Can't become connected user!" in the log-file (/opt/var/samba/log.smbd) and you use the alternate update method: copy /etc/smbpasswd to /unslung/ and add the following lines to your diversion script Please note that on OpenSlug, the log file is on /var/log/log.smbd. (rc.samba):
SAMBA web config toolIf you want to enable SWAT, the Samba web config tool included in the package, you should edit your rc.xinetd diversion script. The diversion script should be in your Unslung directory. Warning : If you already created a rc.xinetd diversion script, you should only add the part from 'if' to 'fi' and insert it before the 'return 1' in your orginal script. Deleting or editing the other content may result in disabled services, which for example could disable your telnet access. If you add the following content, SWAT should work out of the box:
Once that is done just point your browser to http://IP-address-of-your-slug:901, and enjoy. More info on Samba 3 (inclusing SWAT) can be found on the web at: http://us3.samba.org/samba/docs/man/ Full control off SWAT is only given if you logon as root, otherwise functionality will be limited! A normal user only get the buttons: Home, Status, View and Password. The root users also gets the buttons to manage shares. International character support or Unicode supportIf you want to store files from Windows using foreign characters from languages like Chinese, Japanese, Korean, etc you definitely need Samba 3, as it supports this out of the box. Here is what you should add to [global] section of the smb.conf for Samba 3.X.X to enable Cyrillic (Russian) support for Windows XP clients
I use these settings for support of Norwegian and Portugeese characters in filenames under Unslung 6.8 (samba 3): unix charset = UTF-8 dos charset = CP850 display charset = ISO-8859-1 I put these settings into /unslung/smb.conf and put the rc.samba in the same directory (comment away the first line). You also have to change the config file name in /unslung/smb.conf. File size >= 2G and remote smbfs mountWhen mounting smbfs the default does not include large file support, which limits files to less than 2 gigs. Using the lfs option will include large file support. Google "smbfs lfs option", since it seems to be missing from most documentation. A better option is to use cifs, if it's supported by your kernel/distribution/version. When mounting cifs, large files are supported by default. So either : mount -t smbfs //server/share /mountpoint -o lfs other-options or mount -t cifs //server/share /mountpoint -o options
view ·
edit ·
print ·
history ·
Last edited by hzheng.
Based on work by hzheng, RobHam, Jeffrey Gao, amichelf, xypron, vatachnio, Vegard HB, EgorKobylkincom, BrianZhou, Peter Brown, frankvh, ST, Eiffel, JNC, tman, Mark, Dan Scott, KGP, marvin_ii, James, Joe USer, and J. Originally by John. Page last modified on March 05, 2008, at 12:42 AM
|