Reconfiguring Samba Shares

Step 2: Reconfiguring Samba Shares

Prev   Next

Now we're going to mess around with our Samba shares.

I'm going to fix the "Intranet" share, and remove unwanted shares while I'm at it.

Go to (default) and log in.  Then choose "Servers" from the menu options:


We want "Samba Windows File Sharing"

Our current list of shares looks like this:


Let's change this some.
We want to be able to mess with files on our new web site without having to use ftp.
By pointing a Samba share to the correct directory, we can access our site's files through "Network Neighborhood"

Click on "intranet" and change the "Directory to share" to "/var/www"


Then click on "Save" to save your changes.

Now we want to change File Permission options.   Click on the "intranet" share again, and go to the other options at the bottom:


We want "File Permissions", set the options as shown:


Go back and set "Security and Access Control" as shown here:


Delete any shares you don't want
(such as personal users ftp multimedia)
by selecting them from the Samba main menu and choosing "Delete"

My final shares list looks like this:


Now when I browse my network neighborhood, it looks like this:


Great! I'm done now, right?

Not exactly. We have two more issues to deal with.
The first is making our shares permanent.
The second is giving permission to delete files in our new share

The scripts in the system will eventually destroy all of our hard work.
In order to make the changes permanent we have to edit the files that the scripts use as templates.
(this is useful to know if you are going to mess with other system options)
To do this we will use the "File Manager" which is found in WebMin under "Others"


Here is what File Manager looks like after it starts:
(if you're timid, now might be a good time to take a break and do a backup!)


We want to navigate to "etc" and "samba" as shown.
Note: Your scroll wheel doesn't work in this window, use the scroll bars instead.

In the "samba" directory, there is a file called "smb.conf",
click on it once to highlight it, then choose the "Edit" button from the top menu.
A new window will pop up with the editable contents of the file inside it:
(if Internet Explorer blocks the pop up, enable pop-ups for the site!)


Notice the DO NOT EDIT THIS FILE! stuff?  That tells us where we really SHOULD be editing.
In this case, it is the files in the /sa2/templates/etc/samba/smb.confdirectory.

For the moment, though, we are going to scroll to the bottom of the file.
Here we can see the changes that took place when we were editing the Samba shares:


Notice that the [intranet] section has a different indent?

We could highlight and copy the changes to a blank notepad, so we can paste them into the right file.
I'm going to give them to you though, so let's just move to the right file.

Close the Editing /ect/samba/smb.confwindow - just hit "XClose"

Navigate to the /sa2/templates/etc/samba/smb.confdirectory.


All of those files, when added together, make up the /ect/samba/smb.conffile!

Use the "Edit" function to change 20intranetlike so:
(you can copy/paste the text below)

   comment = Custom Intranet Directory
   path = /var/www
   public = yes
   writable = yes
   printable = no
   browseable = yes
   create mask = 0777
   force create mode = 0777
   force directory mode = 0777

Here's what it will look like:


Hit "Save & Close"

Now, if you got rid of the other worthless shares like I did, you need to make a couple more changes:

The end of the 10base file contains [personal], [public] and [users]
We are going to get rid of [personal] and [users] (and the settings for them)
Then hit "Save and Close"

Delete the 30ftp and 50digitalcentral files, unless you want those shares.
Just highlight the file, then click "Delete" from the File Manager's menu.
Possibly you could rename them with a .txt extension. (untested)

I don't think I'll ever use the second disk, (I use mine for backup-snapshot)
but I'm going to remove the [2ndMultimedia] section from 60disktwo just in case.


Ok, now we have made our modified Samba configuration permanent.
The changes we made will no longer be undone by Toshiba's admin scripts.

Now we just need to do one more thing.
Navigate to the /var/www directory and highlight html.
Choose "Info" from File Manager's menu, and change the settings as shown:


Save your changes, you are done!

image Step 1: Disable current Intranet

image Step 3: Enable Web Server & Test