|
samba自动挂载:/etc/auto.master:
- #
- # Sample auto.master file
- # This is a 'master' automounter map and it has the following format:
- # mount-point [map-type[,format]:]map [options]
- # For details of the format look at auto.master(5).
- #
- /misc /etc/auto.misc
- /sambaclient /etc/auto.test
- #
- # NOTE: mounts done from a hosts map will be mounted with the
- # "nosuid" and "nodev" options unless the "suid" and "dev"
- # options are explicitly given.
- #
- /net -hosts
- #
- # Include /etc/auto.master.d/*.autofs
- # The included files must conform to the format of this file.
- #
- +dir:/etc/auto.master.d
- #
- # Include central master map if it can be found using
- # nsswitch sources.
复制代码 /etc/auto.test:
- test -fstype=cifs,username=frank,credentials=/root/linux.txt ://192.168.0.61/mydata
复制代码 或者:
- test -fstype=cifs,username=frank,username=frank,password=frankredhat ://192.168.0.61/mydata
复制代码 凭空cd /sambaclient/test
-------------------------------------------------------------
- -bash-4.2# ls -ld /sambagroup/
- drwxrwsr-x. 2 root sharedg 4096 May 30 09:44 /sambagroup/
复制代码 /etc/samba/smb.conf:
- [global]
- workgroup = SAMBA
- security = user
- passdb backend = tdbsam
- printing = cups
- printcap name = cups
- load printers = yes
- cups options = raw
- hosts allow = 192.168.0., 127.0.0.1
- [homes]
- comment = Home Directories
- valid users = %S, %D%w%S
- browseable = Yes
- read only = No
- inherit acls = Yes
- [printers]
- comment = All Printers
- path = /var/tmp
- printable = Yes
- create mask = 0600
- browseable = No
- [print$]
- comment = Printer Drivers
- path = /var/lib/samba/drivers
- write list = @printadmin root
- force group = @printadmin
- create mask = 0664
- directory mask = 0775
- [mydata]
- comment = mydata
- path=/sambaserver
- browseable=yes
- writeable=yes
- [groupdata]
- comment = groupdata
- path=/sambagroup
- browseable=yes
- writeable=yes
- create mask = 0775
- ~
-
复制代码
|
|