Raspberry Pi is one of the hottest thing in the tech world today with endless utilities. One of the common use is to set up a NAS (Network Area Storage) server, which you can access over your home netlibpam-smbpasswork (Wired LAN or WiFi).
Assuming your storage drive (USB HDD in this case) is already mounted we will proceed with the steps. If you haven't followed the steps to mount your USB HDD yet then follow my other guide here, and then return to this point.
sudo apt-get install samba samba-common-bin
Update: Install libpam-smbpass (For auto sync of unix user passwords)
sudo apt-get install libpam-smbpass
Backup Samba configuration file, and then configure Samba
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
sudo nano /etc/samba/smb.conf
You can copy over the configurations from the below snippet replacing the path to your mounted USB drive.
sudo service samba restart
You should be able to access your NAS from any windows / unix system using the following path \\
Remember you will require to provide credentials of a valid user as added on Raspberry Pi to be able to access the share. If you want it to behave differently then change the settings for security = user and valid users = @users related parameters.