Changes

From Amahi Wiki
Jump to: navigation, search
431 bytes added ,  19:43, 12 May 2010
no edit summary
Everthing I did below is done in putty from a cli interface, Install download putty and enter you hda name or address in the address line. Login as root or "su -".
* We need to create a credential file to mount on startup: sudo nano /root/.smbcredentials *Add the following lines: (You must change hda_username and hda_password to the correct user name and password for the hda to connect to):
username=hda_usernamepassword=hda_password <code>nano /root/.smbcredentials</code>
* Save Add the file by hitting ctrl+x, type "y" following lines. You must change NAS_username and NAS_password to save the buffer, correct user name and <enter> password for the NAS to connect to exit. * Now, change the permissions of the file so only root can read and edit it:
sudo chmod 700 <code>username=NAS_username</rootcode> <code>password=NAS_password</.smbcredentialscode>
* Let's back up our fstab: sudo cp /etc/fstab /etc/fstab_old
o If needed you may return to the original this way: sudo mv /etc/fstab_old /etc/fstab
* Now we edit fstab:
sudo nano /etc/fstab* Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.* Now, change the permissions of the file so only root can read and edit it:
* Add this line at the end: chmod 700 /root/.smbcredentials
* Let's back up our fstab: cp /etc/hdafstab /music etc/mediafstab_old* If needed you may return to the original this way: mv /music cifs credentials=etc/rootfstab_old /.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 etc/fstab* Now we edit fstab:
* Finally, test your settings to make sure they work: nano /etc/fstab
sudo * Add this line at the end (all in one line):  //server/share /var/hda/files/music cifs credentials=/root /.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 * It may be the case that you do not know exacly the name of the NAS server or the share name as it exports it out. To find that, you can use this from the command line: # smbtree* If the share name has spaces, escape them with \040 (wtf? yeah in octal \040), e.g.  //server/My\040Documents/My\040Music * Finally, test your settings to make sure they work:   mount -a
Trusted, Bots, Bureaucrats, emailconfirmed, Administrators
3,789

edits