Raspberry-piでuser追加してパスワードのハッシュをroot,admin,defaultそれぞれにコピーしました。
# cat shadow root:$6$D.1eR0ZD$jikgsw1JSay1GSNwMcxlxiOf6VqF05AvICt25NIhpOpVcVTQeEk89nwUOqrKSIZmVAOPnO4lMTC6KLOMYaSOV.:0:0:99999:7::: bin:*:10933:0:99999:7::: daemon:*:10933:0:99999:7::: adm:*:10933:0:99999:7::: lp:*:10933:0:99999:7::: sync:*:10933:0:99999:7::: shutdown:*:10933:0:99999:7::: halt:*:10933:0:99999:7::: uucp:*:10933:0:99999:7::: operator:*:0:0:99999:7::: ftp:*:10933:0:99999:7::: nobody:*:10933:0:99999:7::: default:$6$D.1eR0ZD$jikgsw1JSay1GSNwMcxlxiOf6VqF05AvICt25NIhpOpVcVTQeEk89nwUOqrKSIZmVAOPnO4lMTC6KLOMYaSOV.:0:0:99999:7::: admin:$6$D.1eR0ZD$jikgsw1JSay1GSNwMcxlxiOf6VqF05AvICt25NIhpOpVcVTQeEk89nwUOqrKSIZmVAOPnO4lMTC6KLOMYaSOV.:0:0:99999:7:::
次にパーミッションの設定、全部777なってるので適宜変更。
chmod 644 /etc/passwd chmod 644 /etc/group chmod 640 /etc/shadow(gshadowは存在しない)
# ls -l /etc total 23 lrwxrwxrwx 1 root root 20 Jul 25 2017 TZ -> /mnt/mtd/ipc/conf/TZ drwxrwxrwx 4 root root 0 Sep 14 2016 Wireless -rwxrwxrwx 1 root root 378 Jan 1 09:12 fstab -rw-r--r-- 1 root root 268 Sep 14 2016 group -rwxrwxrwx 1 root root 9 Sep 14 2016 hostname -rwxrwxrwx 1 root root 35 Sep 14 2016 hosts drwxrwxrwx 2 root root 0 Sep 14 2016 init.d -rwxrwxrwx 1 root root 975 Sep 14 2016 inittab -rwxrwxrwx 1 root root 19 Sep 14 2016 issue -rwxrwxrwx 1 root root 876 Sep 14 2016 mdev.conf lrwxrwxrwx 1 root root 12 Jul 25 2017 mtab -> /proc/mounts -rw-r--r-- 1 root root 648 Jan 1 1970 passwd -rwxrwxrwx 1 root root 1874 Sep 14 2016 profile -rwxrwxrwx 1 root root 1191 Sep 14 2016 protocols lrwxrwxrwx 1 root root 29 Jul 25 2017 resolv.conf -> /mnt/mtd/ipc/conf/resolv.conf -rwxrwxrwx 1 root root 422 Sep 14 2016 securetty drwxrwxrwx 2 root root 0 Sep 13 2016 sensors -rwxrwxrwx 1 root root 10873 Sep 14 2016 services -rw-r----- 1 root root 650 Jan 1 1970 shadow
rebootするとflashromも更新されます。
(LS-F2はReadonlyなのでromを採光性する必要がある:後日記載)
0 件のコメント:
コメントを投稿