编辑文件/etc/fstab: LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hda3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 //server/share /mount/point smbfs username=[username],password=[password] 0 0 用您的有效用户名和密码替换[username] and [password]. 如果您想通过autofs服务来自动挂载Samba共享,可参考下面的信息. 编辑文件/etc/auto.master # $Id: 3420.php,v 1.3 2006/10/24 07:50:27 hli Exp $ # Sample auto.master file # Format of this file: # mountpoint map options # For details of the format look at autofs(8). /misc /etc/auto.misc --timeout=60 编辑文件/etc/auto.misc # $Id: 3420.php,v 1.3 2006/10/24 07:50:27 hli Exp $ # This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # Details may be found in the autofs(5) manpage cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom samba -fstype=smbfs,username=[username],password=[password] ://server/share # the following entries are samples to pique your imagination #linux -ro,soft,intr ftp.example.org:/pub/linux #boot -fstype=ext2 :/dev/hda1 #floppy -fstype=auto :/dev/fd0 #floppy -fstype=ext2 :/dev/fd0 #e2floppy -fstype=ext2 :/dev/fd0 #jaz -fstype=ext2 :/dev/sdc1 #removable -fstype=ext2 :/dev/hdd 编辑完成以后,需要重新启动autofs服务才可以生效,运行命令service autofs restart 或 /etc/init.d/autofs restart. 浏览/misc/samba目录可以看见您的Samba共享目录.