Advertisement
xtree1

smartos smb share

Dec 23rd, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. SmartOS SMB Setup
  2.  
  3.  
  4. This How-To uses delegate dataset to make things easier to manage within the zone. From the ZFS Admin Guide concerning delegate datasets:
  5.  
  6. “The zone administrator can set file system properties, as well as create children. In addition, the zone administrator can take snapshots, create clones, and otherwise control the entire file system hierarchy.”
  7.  
  8. Downside is if the zone is deleted the dataset is also deleted.
  9.  
  10. Import base64 image (tested 15.3.0)
  11. imgadm avail |grep base-64 |grep 15.3.0
  12. 842e6fa6-6e9b-11e5-8402-1b490459e334 base-64 15.3.0 smartos 2015-10-09T15:36:32Z
  13. imgadm import 842e6fa6-6e9b-11e5-8402-1b490459e334
  14. create joyent zone json
  15.  
  16. {
  17. "brand": "joyent",
  18. "alias": "<yourAliasName>",
  19. "hostname": "<yourHostName>",
  20. "image_uuid": "842e6fa6-6e9b-11e5-8402-1b490459e334",
  21. "autoboot": true,
  22. "max_physical_memory": 1024,
  23. "max_swap": 1024,
  24. "quota": 10,
  25. "delegate_dataset": true,
  26. "zfs_data_compression": "on",
  27. "zfs_root_compression": "on",
  28. "dns_domain": "<yourDomainName>",
  29. "resolvers":[
  30. "192.168.1.1",
  31. "8.8.8.8"
  32. ],
  33. "nics": [
  34. {
  35. "nic_tag": "admin",
  36. "ip": "192.168.1.220",
  37. "netmask": "255.255.255.0",
  38. "gateway": "192.168.1.1",
  39. "primary": true
  40. }
  41. ]
  42. }
  43.  
  44.  
  45. add entry to /etc/pam.conf for pam_smb_passwd
  46. other password required pam_dhkeys.so.1
  47. other password requisite pam_authtok_get.so.1
  48. other password requisite pam_authtok_check.so.1
  49. other password required pam_authtok_store.so.1
  50. other password required pam_smb_passwd.so.1 nowarn
  51.  
  52.  
  53. enable smb services:
  54. svcadm enable smb/server
  55. svcadm enable smb/client
  56. svcadm enable rpc/bind
  57. svcadm enable idmap
  58.  
  59. verify with svcs command
  60. admin@nas2 ~]$ svcs |grep smb
  61. online 18:36:54 svc:/network/smb/client:default
  62. online 18:36:54 svc:/network/smb/server:default
  63. online 18:36:55 svc:/network/shares/group:smb
  64. [admin@nas2 ~]$ svcs |grep bind
  65. online 18:36:53 svc:/network/rpc/bind:default
  66. [admin@nas2 ~]$ svcs |grep idmap
  67. online 18:36:54 svc:/system/idmap:default
  68. create a mount point dataset
  69. zfs create zones/6ecf3543-1c65-6600-ab32-e05de443026c/data/share1
  70. set a quota for the dataset
  71. zfs set quota=100M zones/6ecf3543-1c65-6600-ab32-e05de443026c/data/share1
  72. create a mountpoint
  73. sudo zfs set mountpoint=/share1 zones/6ecf3543-1c65-6600-ab32-e05de443026c/data/share1
  74. change file ownership. In this case I used admin:staff
  75. sudo chown admin:staff /share1
  76. change admin’s password so SMB password will be updated
  77. passwd admin xxxx
  78. share the filesystem
  79. sharemgr add-share -r testCifs -s /share1 smb ( -r is the displayed resource name, -s is the share location, smb is the file system export type. see man sharemgr)
  80. test with Windows.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement