Saltycrane logo

SaltyCrane Blog

Notes on Python, Django, and web development on Ubuntu Linux

    

Samba notes

Assumptions

  • 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: 99.99.99.99
  • Windows PC IP address is: 44.44.44.44
  • Username is "johnny"

On Ubuntu Hardy host

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

    In the [globals] section:

       hosts allow = 127.0.0.1 44.44.44.44
       hosts deny = 0.0.0.0/0

    Reference

    Create a new share:

    [myshare]
       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

    Reference

  • 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

    Reference

On Windows host

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

Post a comment

Required
Required, but not displayed
Optional

Format using Markdown. (No HTML.)
  • Code blocks: prefix each line by at least 4 spaces or 1 tab (and a blank line before and after)
  • Code span: surround with backticks
  • Blockquotes: prefix lines to be quoted with >
  • Links: <URL>
  • Links w/ description: [description](URL)
Created with Django | Hosted by Linode