http://wiki.dd-wrt.com/wiki/index.php?title=Configure_Samba_in_Linux&action=history&feed=atom Configure Samba in Linux - Revision history 2024-03-29T00:18:33Z Revision history for this page on the wiki MediaWiki 1.10.1 http://wiki.dd-wrt.com/wiki/index.php?title=Configure_Samba_in_Linux&diff=31756&oldid=prev Glenn: catchg 2010-04-30T16:02:55Z <p>catchg</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 16:02, 30 April 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 106:</strong></td> <td colspan="2" align="left"><strong>Line 106:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> testparm</td><td> </td><td style="background: #eee; font-size: smaller;"> testparm</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">[[Category:<del style="color: red; font-weight: bold; text-decoration: none;">Categories</del>]]</td><td>+</td><td style="background: #cfc; font-size: smaller;">[[Category:<ins style="color: red; font-weight: bold; text-decoration: none;">Flashing networking hardware]]</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">[[Category:Samba</ins>]]</td></tr> </table> Glenn http://wiki.dd-wrt.com/wiki/index.php?title=Configure_Samba_in_Linux&diff=31418&oldid=prev Glenn: +Category:Categories 2010-04-30T09:09:07Z <p>+<a href="/wiki/index.php/Category:Categories" title="Category:Categories">Category:Categories</a></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 09:09, 30 April 2010</td> </tr> <tr><td colspan="2" align="left"><strong>Line 105:</strong></td> <td colspan="2" align="left"><strong>Line 105:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Check smb.conf syntax:</td><td> </td><td style="background: #eee; font-size: smaller;">Check smb.conf syntax:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> testparm</td><td> </td><td style="background: #eee; font-size: smaller;"> testparm</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">[[Category:Categories]]</td></tr> </table> Glenn http://wiki.dd-wrt.com/wiki/index.php?title=Configure_Samba_in_Linux&diff=24926&oldid=prev Anders: /* Troubleshooting */ 2009-03-13T21:30:10Z <p><span class="autocomment">Troubleshooting</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 21:30, 13 March 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 94:</strong></td> <td colspan="2" align="left"><strong>Line 94:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> $ grep jffs /etc/passwd</td><td> </td><td style="background: #eee; font-size: smaller;"> $ grep jffs /etc/passwd</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> jffsuser:x:1001:1001:,,,:/mnt/jffs:/bin/false </td><td> </td><td style="background: #eee; font-size: smaller;"> jffsuser:x:1001:1001:,,,:/mnt/jffs:/bin/false </td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Check if the directory is created and have right permissions:</td><td> </td><td style="background: #eee; font-size: smaller;">Check if the directory is created and have right permissions:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> $ ls -ld /mnt/jffs </td><td> </td><td style="background: #eee; font-size: smaller;"> $ ls -ld /mnt/jffs </td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> drwxr-xr-x 2 jffsuser jffsuser 4096 2009-03-13 21:55 /mnt/jffs/</td><td> </td><td style="background: #eee; font-size: smaller;"> drwxr-xr-x 2 jffsuser jffsuser 4096 2009-03-13 21:55 /mnt/jffs/</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Change Samba password to the user:</td><td> </td><td style="background: #eee; font-size: smaller;">Change Samba password to the user:</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> smbpasswd jffsuser </td><td> </td><td style="background: #eee; font-size: smaller;"> smbpasswd jffsuser </td></tr> </table> Anders http://wiki.dd-wrt.com/wiki/index.php?title=Configure_Samba_in_Linux&diff=24925&oldid=prev Anders: /* Extra commands */ 2009-03-13T21:29:36Z <p><span class="autocomment">Extra commands</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 21:29, 13 March 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 69:</strong></td> <td colspan="2" align="left"><strong>Line 69:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> chown jffsuser:jffsuser /mnt/jffs</td><td> </td><td style="background: #eee; font-size: smaller;"> chown jffsuser:jffsuser /mnt/jffs</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;"><del style="color: red; font-weight: bold; text-decoration: none;"> </del></td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">At the end you should create the password for Samba access. It can (and should) be different from the user system password. As this is the first time we've assign the user a Samba password, you must use -a: </td><td> </td><td style="background: #eee; font-size: smaller;">At the end you should create the password for Samba access. It can (and should) be different from the user system password. As this is the first time we've assign the user a Samba password, you must use -a: </td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> </table> Anders http://wiki.dd-wrt.com/wiki/index.php?title=Configure_Samba_in_Linux&diff=24924&oldid=prev Anders: /* Configuring Samba */ 2009-03-13T21:29:01Z <p><span class="autocomment">Configuring Samba</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 21:29, 13 March 2009</td> </tr> <tr><td colspan="2" align="left"><strong>Line 35:</strong></td> <td colspan="2" align="left"><strong>Line 35:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> invalid users = root</td><td> </td><td style="background: #eee; font-size: smaller;"> invalid users = root</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> load printers = no</td><td> </td><td style="background: #eee; font-size: smaller;"> load printers = no</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">&#160;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;"> </ins></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> [jffs]</td><td> </td><td style="background: #eee; font-size: smaller;"> [jffs]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> comment = JFFS for DD-WRT</td><td> </td><td style="background: #eee; font-size: smaller;"> comment = JFFS for DD-WRT</td></tr> </table> Anders http://wiki.dd-wrt.com/wiki/index.php?title=Configure_Samba_in_Linux&diff=24923&oldid=prev Anders: New page: In this HOWTO we're going to prepare a Samba Filesystem Samba share specific for JFFS. This will work in several GNU/Linux distributions. === Install Samba === Open a terminal and ... 2009-03-13T21:26:23Z <p>New page: In this HOWTO we're going to prepare a Samba Filesystem Samba share specific for <a href="/wiki/index.php/JFFS" title="JFFS">JFFS</a>. This will work in several GNU/Linux distributions. === Install Samba === Open a terminal and ...</p> <p><b>New page</b></p><div>In this HOWTO we're going to prepare a Samba Filesystem Samba share specific for [[JFFS]]. This will work in several GNU/Linux distributions. <br /> <br /> === Install Samba ===<br /> <br /> Open a terminal and write this:<br /> <br /> On Ubuntu:<br /> sudo aptitude install samba<br /> <br /> On Debian (as root): <br /> aptitude install samba<br /> <br /> On Fedora (as root): <br /> yum install samba<br /> <br /> On Suse (as root): <br /> smart install samba<br /> <br /> === Configuring Samba === <br /> <br /> First do a backup of the default configuration:<br /> mv /etc/samba/smb.conf /etc/samba/smb.conf.backup<br /> <br /> Then open the configuration file with your favorite text editor (vim, nano, emacs, gedit, kate)<br /> <br /> vim /etc/samba/smb.conf<br /> <br /> And write this: <br /> <br /> [global]<br /> workgroup = CHANGETHIS<br /> server string = %h server<br /> log file = /var/log/samba/log.%m<br /> security = user<br /> invalid users = root<br /> load printers = no<br /> <br /> [jffs]<br /> comment = JFFS for DD-WRT<br /> path = /mnt/jffs<br /> browseable = no<br /> valid users = jffsuser<br /> read only = no<br /> <br /> Now you have to restart samba service<br /> <br /> In Debian (as root):<br /> /etc/init.d/samba restart<br /> <br /> In Ubuntu:<br /> sudo /etc/init.d/samba restart<br /> <br /> In RPM based distributions like RedHat, Suse, CentOS, Fedora (as root):<br /> service samba restart <br /> or maybe<br /> service smb restart<br /> <br /> === Extra commands ===<br /> <br /> With the configuration file we've done before, you've to create the directory for the mount: <br /> <br /> mkdir /mnt/jffs<br /> <br /> Then create the user in the system, assign it a password and answer several questions. We're also saying that his home directory is /mnt/jffs (same location that we put in the configuration file) and that he doesn't have a valid shell:<br /> <br /> adduser jffsuser --home /mnt/jffs --shell /bin/false<br /> <br /> As the output should tell you, home directory doesn't have the right permissions, let's change it (as root, of course):<br /> <br /> chown jffsuser:jffsuser /mnt/jffs<br /> <br /> At the end you should create the password for Samba access. It can (and should) be different from the user system password. As this is the first time we've assign the user a Samba password, you must use -a: <br /> <br /> smbpasswd -a jffsuser<br /> <br /> === Test it ===<br /> <br /> You can test it by entering this in direction bar in Konqueror or Nautilus:<br /> <br /> smb://jffsuser@localhost/jffs/<br /> or <br /> smb://localhost/jffs/<br /> <br /> Then you can create a file (eg: lala.txt) and check it:<br /> <br /> $ls -l /mnt/jffs<br /> total 4<br /> -rwxr--r-- 1 jffsuser jffsuser 2 2009-03-04 06:39 lala.txt*<br /> <br /> === Troubleshooting ===<br /> <br /> Check if user is created in the system:<br /> <br /> $ grep jffs /etc/passwd<br /> jffsuser:x:1001:1001:,,,:/mnt/jffs:/bin/false <br /> <br /> Check if the directory is created and have right permissions:<br /> <br /> $ ls -ld /mnt/jffs <br /> drwxr-xr-x 2 jffsuser jffsuser 4096 2009-03-13 21:55 /mnt/jffs/<br /> <br /> Change Samba password to the user:<br /> smbpasswd jffsuser <br /> <br /> Check smb.conf syntax:<br /> testparm</div> Anders