Skip to content

Instantly share code, notes, and snippets.

@blackwood821
blackwood821 / triton_cn_encryption_recovery.md
Created April 5, 2021 22:03
Triton CN encryption recovery

First tried using pivy from Homebrew which is version 0.2.1:

chads-mbp:~ chad$ pivy-box challenge respond
sMUCARDI3Wl3raKqjInPYzgmvOcDnRFjaGFjaGEyMC1wb2x5MTMwNQZzaGE1
MTIQ86KZg+L9UYMLdHfxQBgJSghuaXN0cDI1NiECCnmvU/27OhQi5CVHReyZ
R0rK0d22/GgW306EH6Xwjs0hA7MFPSp1Zmudj0Ae/URH7TM4eXDSOBvbZ1dT
PaO8RG/RAAAAANAdj1vPF674DlS2jjSpfk1fHXmqbM+X4Tw37inq95YnpJSN
Gz7OApMX4xdlqv165+Ha5UXHn6NO+gte/GARW+AExp4SHz9qRiMdrRx2ttHL
xjiFO71BkzQ2wFBUAPzC5t6hT6OLm8nro4baezbTpJOqh39Ibwu4ekIqql9H
---
# Test playbook
- hosts: all
  remote_user: root
  
  vars:
    nat_rules:
      - RULE 1
 - RULE 2
@blackwood821
blackwood821 / triton_metadata_put_error.md
Last active March 4, 2021 22:28
Triton metadata put error

On the zone:

[root@ds (us-west-agc:bnbntl) ~]# mdata-put set:state success
plat_recv timeout
receive timeout, resetting protocol...
plat_recv timeout
receive timeout, resetting protocol...
plat_recv timeout
receive timeout, resetting protocol...
plat_recv timeout
@blackwood821
blackwood821 / active_directory_setup.md
Last active February 24, 2021 19:16
Active Directory Setup on CentOS 7
[root@wmbuild sudoers.d]# cat /etc/sssd/sssd.conf 
[sssd]
domains = vrcis.local
config_file_version = 2
services = nss, pam, ssh

[domain/vrcis.local]
id_provider = ldap
cache_credentials = True
Boot Failed: USB 3.0 FD      

>>Start PXE over IPv4.
  PXE-E18: Server response timeout.
Boot Failed: EFI Network 1

>>Start PXE over IPv4.
  PXE-E18: Server response timeout.
Boot Failed: EFI Network 2
[2021-01-28T17:30:24Z] ./agentsetup.sh:147: setup_tools(): /opt/smartdc/bin/sdc-usbkey -v update --ignore-missing
[    79] determining usb key mount status...
[   120] configured usbkey mountpoints: "/mnt/usbkey", "/mnt/usbkey-altmountopts"
[   122] fetching mount information for "/mnt/usbkey"
[   127] "/mnt/usbkey" is not mounted.
[   128] fetching mount information for "/mnt/usbkey-altmountopts"
[   129] "/mnt/usbkey-altmountopts" is not mounted.
[   133] ensuring usb key is mounted (altmountopts: undefined)...
[   171] target usbkey mountpoint: "/mnt/usbkey"
[root@bc-30-5b-f7-83-dc (us-west-agc) /tmp]# cat /tmp/pool.json
{
	"vdevs": [
		{
			"type": "mirror",
			"devices": [
				{
					"name": "c1t0d1",
 "vid": "ATA",
---
# Playbook which patches pkgin vulnerabilities
# by updating to the latest repo and upgrading all packages
- hosts: all
remote_user: root
tasks:
- name: update pkgin
community.general.pkgin:
update_cache: yes
@blackwood821
blackwood821 / update_pkgsrc_rools_repo.md
Last active January 25, 2021 21:25
Update SmartOS pkgsrc tools repo

We have a SmartOS server that is currently using https://pkgsrc.joyent.com/packages/SmartOS/2018Q3/tools/All/. We would like to update to https://pkgsrc.joyent.com/packages/SmartOS/2020Q4/tools/All/ since 2020Q4 has python38. We followed the steps in https://smartos.topicbox.com/groups/smartos-discuss/T127f195b974a0db5-M96818fd15552bc9139be504a but encountered this error:

[root@agcprod1 /tmp]# pkg_add -U pkgin
===========================================================================
The following files are no longer being used by pkgin-0.11.6,
and they can be removed if no other packages are using them:
        /opt/tools/etc/pkgin/repositories.conf
===========================================================================
===========================================================================
@blackwood821
blackwood821 / triton_image_import_error.md
Last active January 20, 2021 22:14
Unable to import custom incremental Triton image

Create temporary zone that will be used to build the image from

The origin image is the previous custom image. The hierarchy at this point is base-64-lts@19.4.0 (Joyent provided image) --> verity-smartos-as@0.0.7 --> verity-smartos-as@0.0.8

chads-mbp:~ chad$ triton inst create -w --name="temp-as-build-zone" verity-smartos-as@0.0.8 build-5G
Creating instance temp-as-build-zone (fcb6e7fe-6d87-47a3-ad04-85c9990d9a29, verity-smartos-as@0.0.8)
Created instance temp-as-build-zone (fcb6e7fe-6d87-47a3-ad04-85c9990d9a29) in 1m6s