Bo's Oracle Station

查看: 1689|回复: 0

课程第22次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2019-5-30 21:12:00 | 显示全部楼层 |阅读模式
samba自动挂载:/etc/auto.master:
  1. #
  2. # Sample auto.master file
  3. # This is a 'master' automounter map and it has the following format:
  4. # mount-point [map-type[,format]:]map [options]
  5. # For details of the format look at auto.master(5).
  6. #
  7. /misc   /etc/auto.misc
  8. /sambaclient  /etc/auto.test
  9. #
  10. # NOTE: mounts done from a hosts map will be mounted with the
  11. #       "nosuid" and "nodev" options unless the "suid" and "dev"
  12. #       options are explicitly given.
  13. #
  14. /net    -hosts
  15. #
  16. # Include /etc/auto.master.d/*.autofs
  17. # The included files must conform to the format of this file.
  18. #
  19. +dir:/etc/auto.master.d
  20. #
  21. # Include central master map if it can be found using
  22. # nsswitch sources.
复制代码
/etc/auto.test:
  1. test    -fstype=cifs,username=frank,credentials=/root/linux.txt ://192.168.0.61/mydata
复制代码
或者:
  1. test    -fstype=cifs,username=frank,username=frank,password=frankredhat ://192.168.0.61/mydata
复制代码
凭空cd /sambaclient/test

-------------------------------------------------------------
  1. -bash-4.2# ls -ld /sambagroup/
  2. drwxrwsr-x. 2 root sharedg 4096 May 30 09:44 /sambagroup/
复制代码
/etc/samba/smb.conf:
  1. [global]
  2.         workgroup = SAMBA
  3.         security = user

  4.         passdb backend = tdbsam

  5.         printing = cups
  6.         printcap name = cups
  7.         load printers = yes
  8.         cups options = raw
  9.         hosts allow =  192.168.0., 127.0.0.1

  10. [homes]
  11.         comment = Home Directories
  12.         valid users = %S, %D%w%S
  13.         browseable = Yes
  14.         read only = No
  15.         inherit acls = Yes

  16. [printers]
  17.         comment = All Printers
  18.         path = /var/tmp
  19.         printable = Yes
  20.         create mask = 0600
  21.         browseable = No

  22. [print$]
  23.         comment = Printer Drivers
  24.         path = /var/lib/samba/drivers
  25.         write list = @printadmin root
  26.         force group = @printadmin
  27.         create mask = 0664
  28.         directory mask = 0775


  29. [mydata]
  30.        comment = mydata
  31.        path=/sambaserver
  32.        browseable=yes
  33.        writeable=yes

  34. [groupdata]
  35.        comment = groupdata
  36.        path=/sambagroup
  37.        browseable=yes
  38.        writeable=yes
  39.        create mask = 0775
  40. ~
  41.                                       
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-7 16:10 , Processed in 0.046198 second(s), 24 queries .

快速回复 返回顶部 返回列表