On Fri, March 28, 2008 3:59 pm, Edward Kerr wrote:
>
>
> I cannot recall who actually gave me this idea, but it did not work!  It
> was the gentleman who was running Ubuntu from a USB stick on a Sony Vaio
>
> I am trying to mount my NAS at boot or log-in.
>
> the command that works perfectly from the command line is:
>
> sudo mount -t smbfs //192.168.1.18/data /mnt/mini -o
> username=admin,password=admin,fmask=0777,dmask=0777
>
> (All one line)
>
> How do I do this automatically?
>
> Do I use FSTAB, but if so how?

You can:

First, I suggest putting a line for the NAS in /etc/hosts:
e.g. 192.168.1.18  nas


Then add the following to /etc/fstab:
//nas/data     /mountpoint    smbfs  
credentials=/home/admin/.smbpasswd,uid=1000,gid=1000  0 0

where uid and gid are the numbers taken from /etc/passwd
(e.g. admin:x:1000:1000::/home/admin:/bin/bash)


Finally create the credentials file (/home/admin/.smbpasswd) with the
following contents:
username=admin
password=admin

And make it read-only for admin and root with the command:
chmod 600 /home/admin/.smbpasswd

HTH
Malc
-- 
Web Development, Technical Copy-Editing & Proofreading

KDE Proofreading Team
KDE British English Translation Team

http://l10n.kde.org/team-infos.php?teamcode=en_GB


_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to