- Joined
- Sep 22, 2004
Ubuntu Guide: Setup Samba File Sharing from the Terminal
Seems like this question always comes up. How do I share my Folding@Home directory so I can monitor the client with HFM.NET? While the later versions of Ubuntu seem to have "easier" ways to enable this functionality (more point-and-click), I've always used the trusty Terminal approach in conjunction with a custom built Samba Configuration file.
This guide should be applicable to all versions of Ubuntu. However, I wrote and tested it on v9.04 since that is the most popular Folding distro at this time.
Seems like this question always comes up. How do I share my Folding@Home directory so I can monitor the client with HFM.NET? While the later versions of Ubuntu seem to have "easier" ways to enable this functionality (more point-and-click), I've always used the trusty Terminal approach in conjunction with a custom built Samba Configuration file.
This guide should be applicable to all versions of Ubuntu. However, I wrote and tested it on v9.04 since that is the most popular Folding distro at this time.
~ sudo apt-get update
~ sudo apt-get install samba
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
samba-common smbclient
Suggested packages:
openbsd-inetd inet-superserver smbldap-tools ldb-tools smbfs
The following NEW packages will be installed:
samba
The following packages will be upgraded:
samba-common smbclient
2 upgraded, 1 newly installed, 0 to remove and 258 not upgraded.
Need to get 18.6MB of archives.
After this operation, 13.7MB of additional disk space will be used.
Do you want to continue [Y/n]? [B][COLOR="Yellow"](Press Enter)[/COLOR][/B]
.
.
.
Installing...
.
.
.
Last thing you should see is this...
.
* Starting Samba daemons [ OK ]
Packages are now installed. But we aren't configured yet. Let's go ahead and stop the Samba deamon.
~ sudo /etc/init.d/samba stop
Code:
* Stopping Samba daemons [ OK ]
Let's make a back-up of the smb.conf file that was laid down with the package installation. There are many good comments in this file that can teach you what each configuration options does.
~ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.template
Start gedit...
~ gedit &
Copy the text below from your browser and paste it into gedit.
Change the <workgroup> and <hostname> entries to those applicable for your network. <workgroup> should be self-explanatory, make it the same as your other machines. For this guide I chose the <hostname> ubuntu-904-vm.
Change the hosts allow entry if your subnet is not on 192.168.0. You can also comment this option (by placing a # character in the first space) if you are not concerned with restricting access based on IP address.
Once the edits are done, save the file to your home folder as smb.conf.
Code:
[global]
workgroup = [B][COLOR="Red"]<workgroup>[/COLOR][/B]
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
netbios name = [B][COLOR="Red"]<hostname>[/COLOR][/B]
guest ok = no
encrypt passwords = true
hosts allow = 192.168.0.
log file = /var/log/samba/log.%m
max log size = 200
security = user
wins support = yes
browseable = yes
smb passwd file = /etc/samba/smbpasswd
domain master = no
local master = no
preferred master = no
os level = 34
invalid users = root
[homes]
browseable = no
writeable = yes
Copy the saved file to the Samba configuration directory.
~ sudo cp ~/smb.conf /etc/samba/smb.conf
Let's now add Samba users.
~ sudo smbpasswd -a <username>
The <username> is the user name you wish to use to access the Samba shares from another computer. So if you're logged into your Windows machine as user1, type user1 in place of <username>.
You'll then be prompted to enter a password. To make things seamless between Windows and Samba, enter the same password you use for your Windows user1 account.
Code:
New SMB password:
Retype new SMB password:
startsmbfilepwent_internal: file /etc/samba/smbpasswd did not exist. File successfully created.
Added user user1.
Finally, let's start the Samba deamon.
~ sudo /etc/init.d/samba start
Accessing the Ubuntu 9.04 Samba home folder share from Windows XP.
Last edited: