Pages

Thursday, May 19, 2011

Using Samba on Ubuntu

Configure: https://help.ubuntu.com/6.06/ubuntu/serverguide/C/configuring-samba.html

smbpasswd -a jseinfeld
  1. sudo apt-get install smbfs smbclient
  2. smbclient -L 192.168.1.2 -U%
  3. smbmount //192.168.1.2/Music /home/dbott/music -o username=dbott,password=mysecretpassword,uid=1000,mask=000
  4. smbumount /home/dbott/music
  5. adding in fstab (unsecure): //192.168.1.2/Music /home/dbott/music smbfs auto,username=dbott,password=mysecretpassword,uid=1000,umask=000,user 0 0
  6. adding in fstab (secure): //192.168.1.2/Music /home/dbott/music smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0
  7. gedit /root/.credentials
  8. and add the following text:
  9. username=your_smb_username
  10. password=your_smb_password
  11. Now, make the file only readable by root:
  12. sudo chmod 600 /root/.credentials
  13. At this point, you can either reboot or reload your fstab:
  14. sudo shutdown -r now
  15. sudo mount -a

No comments:

Post a Comment