SaltyCrane Blog — Notes on JavaScript and web development

Samba notes


  • Trying to access filesystem on Ubuntu Hardy Linux server from Windows Vista PC over the internet. Want to have read and write access.
  • Ubuntu Linux server IP address is:
  • Windows PC IP address is:
  • Username is "johnny"

On Ubuntu Hardy host

  • Install Samba
    apt-get install samba
  • Edit /etc/samba/smb.conf

    In the [globals] section:

       hosts allow =
       hosts deny =


    Create a new share:

       comment = this is my share
       path = /var/www
       read only = no
       guest ok = no
       delete readonly = yes
       create mask = 0644
       force create mode = 0600
       security mask = 0555
       force security mode = 0600


  • Create a user
    adduser johnny
    smbpasswd -a johnny

    Enter a password.

  • Open ports in EC2 Security Group using ElasticFox
    Port 135/TCP - used by smbd
    Port 137/UDP - used by nmbd
    Port 138/UDP - used by nmbd
    Port 139/TCP - used by smbd
    Port 445/TCP - used by smbd


On Windows host

  • In Windows Explorer, enter \\\myshare into the location bar.
  • Enter the "johnny" for the username and the password for the password.