セットアップのメモ
とりあえず作業ユーザを準備する。
[root ~]# groupadd -g 1001 developer [root ~]# tail -n 1 /etc/group developer:x:1001: [root ~]# useradd -d /home/username -c "common user" -m -g developer -u 1001 username [root ~]# usermod -G wheel username [root ~]# groups ikeda username : developer wheel [root ~]# tail -n 1 /etc/passwd username:x:1001:1001:common user:/home/mente:/bin/bash [root ~]# passwd username Changing password for user ikeda. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. [root ~]# su - username [username ~]$ mkdir .ssh && chmod u+rwX,og-rwX .ssh [username ~]$ cd .ssh [username .ssh]$ touch authorized_keys && chmod a-rwX,u+rw authorized_key [username .ssh]$ vi authorized_keys [username .ssh]$ cd .. [username ~]$ chmod go-rwx .ssh [username ~]$ exit logout [root ~]# visudo
下記をコメントアウト
%wheel ALL=(ALL) NOPASSWD: ALL