Sharing files between Ubuntu Feisty/Gutsy and Windows XP or VISTAFollow @ggarron
This guide to install samba server on Ubuntu, will help you share files from your Ubuntu Feisty with the windows machines on your network.
This way maybe you will be able to use Ubuntu at your office, hope you can.
[Update: 12/13/2010. You may want to check Share files and printers with Samba
First install samba
sudo apt-get install samba
With this you will have samba installed on your system, now you need to edit the configuration file which is located at:
Here I will put a simple minimal configuration to allow share files from your Linux server.
workgroup = MSHOME netbios name = UBUNTU_SERVER security = SHARE auth methods = guest domain master = No wins support = Yes
comment = mi home path = /home/ggarron read only = No guest ok = Yes
Ok, the [global] section lets you configure all global parameters, which in this case are:
- workgroup; Lets you specify the windows workgroup
- netbios name; Lets you specify the name with your Linux PC will be seen by windows PCs
- security; specifies the level of security, default is user, but if the users on the windows PCs are not the same as the ones on the Linux PC, you better use share instead
- auth methods; Possible options include guest (anonymous access), sam (lookups in local list of accounts based on netbios name or domain name), winbind (relay authentication requests for remote users through winbindd), ntdomain (pre-winbindd method of authentication for remote domain users; deprecated in favour of winbind method), trustdomain (authenticate trusted users by contacting the remote DC directly from smbd; deprecated in favour of winbind method)
- domain master; Lets you configure your PC as a domain master or not, in this case we prefer not, as our goal is only to share files
- wins support; If you want or not to have wins enabled or not
Now comes the shares section, the string you put between the  will be how windows will sees the share, in this case share1
Until here you are able to share files from your Linux PC to your Windows PCs.
If you want to configure Samba using a GUI tool, you may want to install swat (samba web administration tool).
Once again you first need to install the software, which in this case it is almost all you need to do.
sudo apt-get install swat netkit-inetd tcpd
Once installed you can open your browser and enter
You will need to login as root to have full access to configure samba by this way.
so you will first need to enable root user on Ubuntu
sudo passwd root
then choose a password for your root user.
could be good to block access to port 901 via your firewall , or use SSL to secure the connection.
How to enable SSL for SWAT?, fortunately it is easy, here is how.
- Install OpenSSL.
- Generate certificate and private key.
/usr/bin/openssl req -new -x509 -days 365 -nodes -config /usr/share/doc/packages/stunnel/stunnel.cnf -out /etc/stunnel/stunnel.pem -keyout -etc/stunnel/stunnel.pem
- Remove SWAT entry from [x]inetd.
- Start stunnel.
stunnel -p /etc/stunnel/stunnel.pem -d 901 -l /usr/local/samba/bin/swat swat
Update for Vista:
You will need samba 3.0.22 in order to see shares of Linux on Vista, and to be able to mount the Vista's shares on Linux you will maybe need to do it manually using the mount command.
mount -t smbfs -o username=[username] password=[secret] //ip_address/share /mountpoint
Please post your experiences, if you want to know more about Linux, and how to work with it,
If you want to learn more about Samba check this out