vlock コマンドで tmux をロックする

現在ターミナルマルチプレクサは Byobu 経由で GNU screen と tmux を環境により併用しています.GNU screen では画面ロックの設定をしていたのですがtmux は設定していなかったので今回 console lock コマンドの vlock を設定してみました.

導入
$ sudo apt install vlock
help
$ vlock -h
vlock: locks virtual consoles, saving your current session.
Usage: vlock [options] [plugins...]
	   Where [options] are any of:
-c or --current: lock only this virtual console, allowing user to
	   switch to other virtual consoles.
-a or --all: lock all virtual consoles by preventing other users
	   from switching virtual consoles.
-n or --new: allocate a new virtual console before locking,
	   implies --all.
-s or --disable-sysrq: disable SysRq while consoles are locked to
	   prevent killing vlock with SAK
-t <seconds> or --timeout <seconds>: run screen saver plugins
	   after the given amount of time.
-v or --version: Print the version number of vlock and exit.
-h or --help: Print this help message and exit.
カレントコンソールをlock してみる.何かキーを押した後ユーザのパスワードを入力することで復帰できる.
$ vlock -c
This TTY is now locked.

Please press [ENTER] to unlock.
matoken's Password:
全てのコンソールをロックする.ロック状態で Alt + n で他のコンソールに移動しても全てロックされている.
$ vlock -a
The entire console display is now completely locked.
You will not be able to switch to another virtual console.

Please press [ENTER] to unlock.
matoken's Password:
$ tty
/dev/tty1
仮想コンソール(Xの端末, ターミナルマルチプレクサ, script等)では全てのロックは失敗する
$ vlock -a
vlock: this terminal is not a virtual console
$ tty
/dev/pts/9
tmux に設定してみる(byobu 経由の場合)
$ cat ~/.byobu/.tmux.conf
# Enable locking(I need vlock -> sudo apt install vlock)
set -g lock-command vlock
set -g lock-after-time 0
bind l lock-session

.tmux.conf に設定した状態で tmux を起動して Ctrl+b l と押すと vlock でロックされます.セッション単位でロックされます.

ちなみに X では xscreensaver-command -activate を設定しています.例えば以下は awesome wm で Mod4 + l に設定してあります.

    -- lock screen
    awful.key({ "Mod1"  }, "l", function () awful.util.spawn( "xscreensaver-command -activate",false) end),
環境1
$ dpkg-query -W byobu screen tmux vlock
byobu   5.129-1
screen  4.6.2-3
tmux    2.8-3
vlock   2.2.2-8
$ hostnamectl | egrep 'Operating System|Architecture'
  Operating System: Debian GNU/Linux 10 (buster)
      Architecture: x86-64

crontab の実行タイミングをわかりやすく表示してくれる cronv を試す

ちょっと試したら少し嵌ったのでメモがてら.

build
$ go get github.com/takumakanari/cronv/cronv
$ go build -o ./cronv github.com/takumakanari/cronv/cronv
Usage
$ ./cronv -h
Usage:
  Cronv v0.4.1 [OPTIONS]

Application Options:
  -o, --output=    path to .html file to output (default: ./crontab.html)
  -d, --duration=  duration to visualize in N{suffix} style. e.g.) 1d(day)/1h(hour)/1m(minute) (default: 6h)
      --from-date= start date in the format '2006/01/02' to visualize (default: 2019/05/25)
      --from-time= start time in the format '15:04' to visualize (default: 02:50)
  -t, --title=     title/label of output (default: Cron Tasks)
  -w, --width=     Table width of output (default: 100)

Help Options:
  -h, --help       Show this help message
実行
$ crontab -l | ./cronv

2019-06-01 ADD: 以下のtab が含まれているときにエラーとなる問題は修正されました😖

しかし,missing field(s) とか syntax error in year field: とかのエラーになってしまう.

$ printf "* * * * *\tcommand\n"
* * * * *       command
$ printf "* * * * *\tcommand\n" | ./cronv
panic: Failed to analyze cron '* * * * *        command': syntax error in year field: 'command'

goroutine 1 [running]:
panic
        ../../../src/libgo/go/runtime/panic.go:554
main.main
        /home/mk/go/src/github.com/takumakanari/cronv/cronv/main.go:33

タブ区切りをやめてスペース区切りにするとエラーが出ない

$ printf "* * * * * command\n" | ./cronv
[Cron Tasks] 1 tasks.
[Cron Tasks] './crontab.html' generated.

ということでとりあえずタブをスペースに変換することにした.

$ crontab -l | tr -s '\t' ' ' | ./cronv
[Cron Tasks] 8 tasks.
[Cron Tasks] './crontab.html' generated.

作成された crontab.html を w3m で……ほとんど表示されない.

20190525 03 36 35 001

もう少しリッチな JavaScript の動くウェブブラウザで開くとOK.
これからの6時間分の様子が見える.

20190525 03 00 01 001

-d, --duration option で表示する時間間隔が指定できる.
開始日時は,--fron-date, --from-time option で指定できる.
以下の例では 2019-05-25 00:00:00 から1日分の表示になる.

$ crontab -l | tr -s '\t' ' ' | ./cronv -d 1d --from-date=2019/05/25 --from-time=00:00

20190525 02 58 37 001

ちなみに1ヶ月も試したが,ウェブブラウザで表示するのにとても時間が掛かった.

環境
$ dpkg-query -W cron gccgo-go
cron    3.0pl1-128.1ubuntu1
gccgo-go        2:1.10~4ubuntu1
$ lsb_release -d
Description:    Ubuntu 18.04.2 LTS
$ uname -m
x86_64

Android で Wi-Fi 経由の adb を有効にして backup

Android 端末側でUSB デバッグを有効にしてUSB接続する.
デバイスが認識されているか確認.

$ adb devices
List of devices attached
PM1LHMA861102833        device

no permissions と言われた場合

$ adb devices
List of devices attached
PM1LHMA861102833        no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]

は以下のようにして udev のルルーを追加する.VID/PID(以下の例では2e18, c032)部分はdmesgやlsusbで確認して自分の端末のIDに書き換える.

$ echo '# Essential PH-1
> SUBSYSTEM=="usb", ATTR{idVendor}=="2e17", ATTR{idProduct}=="c032", MODE="0666", GROUP="adbandy"' | sudo tee /etc/udev/rules.d/51-android.rules
# Essential PH-1
SUBSYSTEM=="usb", ATTR{idVendor}=="2e17", ATTR{idProduct}=="c032", MODE="0666", GROUP="adbandy"

その後USB を接続し直して確認し直す.

HostPC の adb コマンドで tcpip コマンドで接続できるようにして,connect コマンドで Android 端末の ip を指定して接続します.
5555 はポート番号で 5555 が規定値.既定値から変更した場合は,connect コマンドの ip の後ろにポート番号の指定が必要になります.

$ adb tcpip 5555
$ adb connect 192.168.1.200
connected to 192.168.1.200:5555

この状態でusb 接続を解除して devides コマンドに居ます :)
後は普通に使えます.

$ adb devices
List of devices attached
192.168.1.200:5555      device
$ adb logcat|head -1
--------- beginning of crash
^C

そして本命のバックアップ.

$ time adb backup -f ./PH-1.ab -all
Now unlock your device and confirm the backup operation...

real   26m2.104s
user    0m0.171s
sys     0m5.725s

用事が終わったら切断しておいたほうが安心ですね.

$ adb disconnect 192.168.1.200
disconnected 192.168.1.200
$ adb devices
List of devices attached
環境(Android)
mata:/ $ getprop ro.bootimage.build.fingerprint
essential/mata/mata:9/PQ1A.190105.058/496:user/release-keys
mata:/ $ getprop ro.build.version.security_patch
2019-05-05
mata:/ $ getprop ro.product.cpu.abilist
arm64-v8a,armeabi-v7a,armeabi
環境(HostPC)
$ dpkg-query -W adb
adb     1:8.1.0+r23-5
$ lsb_release -dr
Description:    Debian GNU/Linux 10 (buster)
Release:        10
$ uname -m
x86_64

nanoを消したDebianでエディタの警告が出るのを修正

vim使うのでnanoを消しているのですが警告が出ています.

$ sudo crontab -e
/usr/bin/sensible-editor: 25: /usr/bin/sensible-editor: /bin/nano: not found
/usr/bin/sensible-editor: 28: /usr/bin/sensible-editor: nano: not found
/usr/bin/sensible-editor: 31: /usr/bin/sensible-editor: nano-tiny: not found
crontab: installing new crontab

fallback?でvimに切り替わるので実害はないのですが気持ち悪い.
警告を出している sensible-editor を確認.

$ man sensible-editor|more
SENSIBLE-EDITOR(1)                                         General Commands Manual                                         SENSIBLE-EDITOR(1)

NAME
       sensible-editor, sensible-pager, sensible-browser - sensible editing, paging, and web browsing

SYNOPSIS
       sensible-editor [OPTIONS...]
       sensible-pager [OPTIONS...]
       sensible-browser url

DESCRIPTION
       sensible-editor,  sensible-pager and sensible-browser make sensible decisions on which editor, pager, and web browser to call, respec‐
       tively.  Programs in Debian can use these scripts as their default editor, pager, or web browser or emulate their behavior.

SEE ALSO
       Documentation of the EDITOR, VISUAL and PAGER variables in environ(7) and select-editor(1) for changing a user's default editor

STANDARD
       Documentation of behavior of sensible-utils under a debian system is available under section 11.4 of debian-policy  usually  installed
       under /usr/share/doc/debian-policy (you might need to install debian-policy)

Debian                                                           14 Nov 2010                                               SENSIBLE-EDITOR(1)

select-editor を実行するとインストール済のエディタを選択できる.

$ sudo select-editor

Select an editor.  To change later, run 'select-editor'.
  1. /usr/bin/vim.gtk3
  2. /usr/bin/vim.nox
  3. /usr/bin/vim.basic
  4. /usr/bin/mcedit
  5. /usr/bin/vim.tiny
  6. /usr/bin/vscodium

Choose 1-6 [1]: 2

警告が出なくなりました :)

$ sudo crontab -e
crontab: installing new crontab

環境

$ dpkg-query -W sensible-utils cron vim
cron    3.0pl1-133
sensible-utils  0.0.12
vim     2:8.1.0875-2
$ lsb_release -dr
Description:    Debian GNU/Linux 10 (buster)
Release:        10
$ uname -m
x86_64

色々なプログラムで proxy を使えるようにする proxychains-ng を試す

proxychains-ng というものを見かけたので試してみます.ネットワーク関連の関数をフックして,SOCKS 4a, 5, HTTP proxy を利用できるようにします.
torsocks的な感じ.

とりあえずこんな感じで動きました

$ git clone https://github.com/rofl0r/proxychains-ng
$ cd proxychains-ng
$ ./configure && make

src/proxychains.confにtorの設定が書いてあるのでとりあえずそれで動かします.(tor daemon が動いている前提)
1回目はtimeoutに,2回目は成功.

$ ./proxychains4 -f src/proxychains.conf curl ifconfig.me/ip
  :
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ifconfig.me:80 <--socket error or timeout!
curl: (7) Couldn't connect to server
$ ./proxychains4 -f src/proxychains.conf curl ifconfig.me/ip
  :
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ifconfig.me:80  ...  OK
158.69.192.239

torsocksでは起動しないfirefox も起動した.

$ ./proxychains4 -f src/proxychains.conf firefox

Debian package にも proxychains4 という名前であった.こっちのほうが楽ですね.

$ apt show proxychains4
Package: proxychains4
Version: 4.13-4
Priority: optional
Section: net
Source: proxychains-ng
Maintainer: Boyuan Yang <byang@debian.org>
Installed-Size: 45.1 kB
Provides: proxychains, proxychains-ng
Depends: libproxychains4 (= 4.13-4), libc6 (>= 2.4)
Breaks: proxychains (<< 3.1-8)
Replaces: proxychains
Homepage: https://github.com/rofl0r/proxychains-ng
Download-Size: 14.1 kB
APT-Sources: http://ftp.jp.debian.org/debian sid/main amd64 Packages
Description: redirect connections through socks/http proxies (proxychains-ng)
 Proxychains is a UNIX program, that hooks network-related libc functions
 in dynamically linked programs via a preloaded DLL (dlsym(), LD_PRELOAD)
 and redirects the connections through SOCKS4a/5 or HTTP proxies.
 It supports TCP only (no UDP/ICMP etc).
 .
 This project, proxychains-ng, is the continuation of the unmaintained
 proxychains project (known as proxychains package in Debian).
$ sudo apt install proxychains4
$ $ proxychains4 curl ifconfig.me/ip
[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.13
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ifconfig.me:80  ...  OK
94.230.208.147

環境

$ lsb_release -dr
Description:    Debian GNU/Linux 10 (buster)
Release:        10
$ uname -m
x86_64

apt upgrade で ping(inetutils-ping) が壊れていると言われて失敗する

Debian sid amd64 環境で,apt upgrade するとこんなエラーで失敗しました.

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree     
Reading state information... Done    
Calculating upgrade... Done          
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.         
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 inetutils-ping : Conflicts: ping
E: Broken packages 

ping コマンドはあるし実行も出来る.reinstall してみましたがエラーは解消されず.

$ sudo apt install --reinstall inetutils-ping                                                                     
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  python-newt
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 57 not upgraded.
Need to get 0 B/226 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 472864 files and directories currently installed.)
Preparing to unpack .../inetutils-ping_2%3a1.9.4-7_amd64.deb ...
Unpacking inetutils-ping (2:1.9.4-7) over (2:1.9.4-7) ...
Setting up inetutils-ping (2:1.9.4-7) ...
Processing triggers for man-db (2.8.5-2) ...

一時的に削除してみました.

$ sudo apt remove inetutils-ping
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  python-newt
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  inetutils-ping
0 upgraded, 0 newly installed, 1 to remove and 57 not upgraded.
After this operation, 358 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 472864 files and directories currently installed.)
Removing inetutils-ping (2:1.9.4-7) ...
Processing triggers for man-db (2.8.5-2) ...

削除した後 apt upgrade を試すと通りました.

$ sudo apt upgrade

その後 ping を install し直したあと upgrade を試すとエラーは出なくなりました.

$ sudo apt install inetutils-ping
$ sudo apt upgrade>/dev/null 2>&1;echo $?
0

原因がよくわからないですね…….

環境

$ dpkg-query -W apt inetutils-ping
apt     1.8.0
inetutils-ping  2:1.9.4-7
$ lsb_release -dr
Description:    Debian GNU/Linux 10 (buster)
Release:        10
$ uname -m
x86_64

dhcp パケットをキャプチャするメモ

tcpdumpの場合
$ sudo tcpdump -i wlp3s0 port 67 or port 68 -e -n
[sudo] password for matoken:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
21:07:44.898511 00:23:15:5b:a6:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:23:15:5b:a6:60, length 300
dhcpdump も読みやすくて便利
$ sudo dhcpdump -i wlp3s0
  TIME: 2019-04-10 21:17:17.398
	IP: 0.0.0.0 (0:23:15:5b:a6:60) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
	OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: 011d073a
  SECS: 0
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:23:15:5b:a6:60:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  50 (  4) Request IP address        192.168.1.5
OPTION:  12 (  5) Host name                 x201i
OPTION:  55 ( 17) Parameter Request List      1 (Subnet mask)
											 28 (Broadcast address)
											  2 (Time offset)
											  3 (Routers)
											 15 (Domainname)
											  6 (DNS server)
											119 (Domain Search)
											 12 (Host name)
											 44 (NetBIOS name server)
											 47 (NetBIOS scope)
											 26 (Interface MTU)
											121 (Classless Static Route)
											 42 (NTP servers)
											249 (MSFT - Classless route)
											 33 (Static route)
											252 (MSFT - WinSock Proxy Auto Detect)
											 17 (Root path)


--------------------


^C

apt/apt-get のエイプリルフール牛さん

昨夜なんとなく apt コマンドのイースターエッグの apt moo を実行してみました.するといつもとは違った牛が!

20190402 00 04 09 23354

Debian sid 環境だったのでもしかしてキャラクター変更されたのだろうかと思ったのですがしばらくしてから再度実行するといつもの牛.

20190402 20 04 14 16775

時計を見ると日付が04/01から04/02に変わったところでした.
04/01に出現したってことはエイプリルフールな牛かな?と faketime command を利用して1日前にして実行すると出てきました.

$ faketime -f '-1d' apt moo
               _     _
              (_\___( \,
                )___   _  Have you smashed some milk today?
               /( (_)-(_)    /
    ,---------'         \_
  //(  ',__,'      \  (' ')
 //  )              '----'
 '' ; \     .--.  ,/
    | )',_,'----( ;
    ||| '''     '||

若しくは04/01を指定

$ faketime '20190401' apt moo
               _     _
              (_\___( \,
                )___   _  Have you smashed some milk today?
               /( (_)-(_)    /
    ,---------'         \_
  //(  ',__,'      \  (' ')
 //  )              '----'
 '' ; \     .--.  ,/
    | )',_,'----( ;
    ||| '''     '||

多分この辺ですね

$ grep -A21 bool\ DoMooApril ./apt-private/private-moo.cc
static bool DoMooApril()                                                /*{{{*/
{
   // by Christopher Allan Webber and proposed by Paul Tagliamonte
   // in a "Community outreach": https://lists.debian.org/debian-devel/2013/04/msg00045.html
   if (_config->FindI("quiet") >= 2)
   {
      std::cerr << "Have you smashed some milk today?" << std::endl;
      return true;
   }
   c1out <<
      "               _     _\n"
      "              (_\\___( \\,\n"
      "                )___   _  Have you smashed some milk today?\n"
      "               /( (_)-(_)    /\n"
      "    ,---------'         \\_\n"
      "  //(  ',__,'      \\  (' ')\n"
      " //  )              '----'\n"
      " '' ; \\     .--.  ,/\n"
      "    | )',_,'----( ;\n"
      "    ||| '''     '||\n";
   return true;
}

1.4 で入ったぽい?

$ zgrep -A2 \(1.4\) /usr/share/doc/apt/changelog.gz
apt (1.4) unstable; urgency=medium

  * The April Fools' Release

ちなみに moo moo でカラフルな牛が出てこないときは,APT::Moo::Color オプションが使えるようです.(エイプリルフール牛は単色のみみたい)

20190402 20 04 40 17194

永続化する場合や色をカスタマイズしたい場合は /usr/share/doc/apt/examples/configure-index.gz を参考に /etc/apt/apt.conf に設定すればok.

$ zgrep moo::color /usr/share/doc/apt/examples/configure-index.gz
apt::moo::color "<BOOL>";
$ echo 'apt::moo::color "true";' | sudo tee -a /etc/apt/apt.conf
apt::moo::color "true";
$ dpkg-query -W apt faketime
apt     1.8.0
faketime        0.9.7-3
$ lsb_release -dr
Description:    Debian GNU/Linux buster/sid
Release:        unstable
$ uname -m
x86_64

Ubuntu Server インストーラの Github, Launchpad からの ssh公開鍵インポート機能

github.com/settings/keys からSSH Keyとして突っ込んどくと便利だし、今のUbuntu Serverはセットアップでそれを使う項目すらあるので

なるほど便利そう
試してみようと Ubuntu Server 18.04.2 LTS
(ubuntu-18.04.2-live-server-amd64.iso) のインストーラで試してみました.

OpenSSH を導入するようにすると,SSH鍵をインポートするオプションで Github / Launchpad が選べます.
Screenshot ubuntu18 04 2019 03 30 13 02 56

こんな感じでインポートされました.
Screenshot ubuntu18 04 2019 03 30 13 05 37

インストールが終了して ssh login するとインポートされた鍵で login 出来ました.

インポートされた公開鍵を確認するとコメント部分が少し書き換わっています.

$ cat ~/.ssh/authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPgwY9aZPxN/YoBBzd7TOcCk7EuGO0E9PuUjCHPtTuHP matoken@github/16598604 # ssh-import-id gh:matoken
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEoKnbjj7cVafcAJbYHqUEua1x/81uzoK0LnjgqmR6H8 matoken@github/33364582 # ssh-import-id gh:matoken

sshd_config を見ると編集ではなく末尾に追記してるのでちょっと雑い感.

$ grep PasswordAuthentication /etc/ssh/sshd_config
#PasswordAuthentication yes
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication
PasswordAuthentication no
$ tail -1 /etc/ssh/sshd_config
PasswordAuthentication no

ちなみに,Github から鍵を入手するのはこんな感じで行けるようです.
(<USERNAME>部分を該当ユーザ名に修正)

Launchpad はこんな感じ.

ちなみにLaunchpad は未だED25519形式には未対応なようです.
20190330 13 03 12 27418

Bitbucket の鍵も同様に https://api.bitbucket.org/2.0/users/<USERNAME>/ssh-keys で入手できそうと思ったのですが,未認証では駄目みたいです.

$ curl -s https://api.bitbucket.org/2.0/users/matoken/ssh-keys|jq
{
  "type": "error",
  "error": {
    "message": "This API is only accessible with the following authentication types: session, password, apppassword"
  }
}
環境
$ lsb_release -d
Description:	Ubuntu 18.04.2 LTS
$ uname -m
x86_64

Ansibleもくもく会(サーバ編)2019.03 in オイシックス・ラ・大地!に遠隔参加 #ansiblejp

03/26にこのイベントに遠隔参加してみました.遠隔枠がある!てことで申し込み.人気があるようで申込み時点ではギリギリ選外でしたがその後繰り上がりで参加できました.

構成管理ツールの1つである Ansible 及び Ansible Tower のもくもく会です.
遠隔枠では BlueJeans という会議システムを利用でしたがトラブルのためほぼなしで最後のLTの一部のみ聞けた感じでした.
教材となるドキュメント(Ansible を1から始める人でもok)を見ながら用意されたAWS 環境を利用して各自学習していき,質問等はGoogleDoc を共有してそこで質問するとメンターの方が答えてくれるという形でした.
会議システムがうまく行きませんでしたが,GoogleDocとメンターの方々のおかげで十分成り立つ感じでした.

興味がある方は教材は公開されているのでそれを利用して自習したり(要環境構築),04/20にもリモート枠のある(恐らく)同じイベントがあるので参加してみるといいかもしれません.

また,もくもく会ではありませんがこういうイベントも開催されるようです.
こちらもウェブ参加枠があるので可能なら参加してみようと思っています.

ここから自分のハマったところ

サーバのパスワードが短い単語1つだったのでログインして即変更したけど,認証にパスワード認証を使っていたのでansible が通信できなくなってしまった.

$ ansible control -m command -a "uptime" -o
ansible | UNREACHABLE!: Invalid/incorrect password: no such identity: /home/student4/.ssh/aws-private.pem: No such file or directory
Permission denied, please try again.

passwdコマンドで治そうと思ったけど弱いパスワードなので起こられて設定できない

BAD PASSWORD: The password is shorter than 8 characters

なので,

$ openssl passwd -6 -salt $(openssl rand -base64 6) PASS

として SHADOW を作り,sudo vipw -s で該当ユーザの第2フィールドを書き換えた.

Ansible Tower Exercise 3 の Step 4 の「ADD SURVEY」ボタンが見つからない

ライセンスを間違えていた.

Ansible Towerのインストール に載っている Ansible Tower License ではなく, Exercise 2 – Ansible Towerのコンフィグレーション Step2 に載っている Ansible Workshop License のライセンスと差し替えて利用可能になった.

前日に Ansible Tower の環境構築で何箇所か嵌った

以下のページに