[Samba] /etc/fstab

Bob Crandell bob at assuredcomp.com
Fri Sep 20 15:05:41 GMT 2002


cj (cj at itonsite.com.au) wrote*:
>
>G'day all
>Is it possible to get fstab to mount a samba share?
>I see it can mount nfs shares, but I need to know about samba shares
>
>Thanks
>
# In /etc/fstab
# To mount a public share
//ocicat/Public /mnt/Public smbfs
username=pcguest,password=password,uid=pcguest,gid=users,rw
# To mount a private share
//ocicat/home /home/bob/Data smbfs
noauto,username=bob,password=password,uid=bob,gid=users,rw

# In /etc/profile
# To login
if [ -e ~/Data ]; then
   sudo mount ~/Data
fi
# To logout
trap "sudo /bin/umount ~/Data; /usr/bin/clear" EXIT

# In /etc/sudoers
bob     ALL=(ALL) NOPASSWD: ALL

In my case, this isn't a problem but you don't want to do this in production because
of security.  I'm trying to figure out how to do this without having to use sudo.

I hope this is what you were asking.
--
Bob Crandell
Assured Computing
When you need to be sure.
Voice 541-689-9159
FAX   240-371-7237
bob at assuredcomp.com
www.assuredcomp.com
Eugene, Or. 97402





More information about the samba mailing list