Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SmartOS SMB Setup
- This How-To uses delegate dataset to make things easier to manage within the zone. From the ZFS Admin Guide concerning delegate datasets:
- “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.”
- Downside is if the zone is deleted the dataset is also deleted.
- Import base64 image (tested 15.3.0)
- imgadm avail |grep base-64 |grep 15.3.0
- 842e6fa6-6e9b-11e5-8402-1b490459e334 base-64 15.3.0 smartos 2015-10-09T15:36:32Z
- imgadm import 842e6fa6-6e9b-11e5-8402-1b490459e334
- create joyent zone json
- {
- "brand": "joyent",
- "alias": "<yourAliasName>",
- "hostname": "<yourHostName>",
- "image_uuid": "842e6fa6-6e9b-11e5-8402-1b490459e334",
- "autoboot": true,
- "max_physical_memory": 1024,
- "max_swap": 1024,
- "quota": 10,
- "delegate_dataset": true,
- "zfs_data_compression": "on",
- "zfs_root_compression": "on",
- "dns_domain": "<yourDomainName>",
- "resolvers":[
- "192.168.1.1",
- "8.8.8.8"
- ],
- "nics": [
- {
- "nic_tag": "admin",
- "ip": "192.168.1.220",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "primary": true
- }
- ]
- }
- add entry to /etc/pam.conf for pam_smb_passwd
- other password required pam_dhkeys.so.1
- other password requisite pam_authtok_get.so.1
- other password requisite pam_authtok_check.so.1
- other password required pam_authtok_store.so.1
- other password required pam_smb_passwd.so.1 nowarn
- enable smb services:
- svcadm enable smb/server
- svcadm enable smb/client
- svcadm enable rpc/bind
- svcadm enable idmap
- verify with svcs command
- admin@nas2 ~]$ svcs |grep smb
- online 18:36:54 svc:/network/smb/client:default
- online 18:36:54 svc:/network/smb/server:default
- online 18:36:55 svc:/network/shares/group:smb
- [admin@nas2 ~]$ svcs |grep bind
- online 18:36:53 svc:/network/rpc/bind:default
- [admin@nas2 ~]$ svcs |grep idmap
- online 18:36:54 svc:/system/idmap:default
- create a mount point dataset
- zfs create zones/6ecf3543-1c65-6600-ab32-e05de443026c/data/share1
- set a quota for the dataset
- zfs set quota=100M zones/6ecf3543-1c65-6600-ab32-e05de443026c/data/share1
- create a mountpoint
- sudo zfs set mountpoint=/share1 zones/6ecf3543-1c65-6600-ab32-e05de443026c/data/share1
- change file ownership. In this case I used admin:staff
- sudo chown admin:staff /share1
- change admin’s password so SMB password will be updated
- passwd admin xxxx
- share the filesystem
- 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)
- test with Windows.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement