Life is fun and easy!
不正IP報告数
Okan Sensor
ページへ戻る
印刷
RapsberryPi3/003/UserAddUserDel
をテンプレートにして作成 ::
UJP
tech_regist2
:RapsberryPi3/003/UserAddUserDel をテンプレートにして作成
開始行:
*Rapsberry Pi3のRaspbianでユーザの追加と削除を行う
**はじめに
Raspbianにはpiユーザがデフォルトで作成されているが,そ...
pi@commet:~ $ su - root
パスワード:
root@commet:~#
root@commet:~# cat /etc/passwd|grep -v false|grep -v nol...
root:x:0:0:root:/root:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
pi:x:1000:1000:,,,:/home/pi:/bin/bash
root@commet:~#
root@commet:~# userdel -r pi
userdel: user pi is currently used by process 756
root@commet:~#
root@commet:~# adduser ujpadmin
ユーザ `ujpadmin' を追加しています...
新しいグループ `ujpadmin' (1001) を追加しています...
新しいユーザ `ujpadmin' (1001) をグループ `ujpadmin' と...
ホームディレクトリ `/home/ujpadmin' を作成しています...
`/etc/skel' からファイルをコピーしています...
新しい UNIX パスワードを入力してください:
新しい UNIX パスワードを再入力してください:
passwd: パスワードは正しく更新されました
ujpadmin のユーザ情報を変更中
新しい値を入力してください。標準設定値を使うならリターン...
フルネーム []: UJP admin
部屋番号 []:
職場電話番号 []:
自宅電話番号 []:
その他 []:
以上で正しいですか? [Y/n] y
root@commet:~#
root@commet:~# cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as ...
#
# Please consider adding local content in /etc/sudoers.d...
# directly modifying this file.
#
# See the man page for details on how to write a sudoers...
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/us...
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" dire...
#includedir /etc/sudoers.d
pi ALL=(ALL) NOPASSWD: ALL
root@commet:~#
root@commet:~# echo 'ujpadmin ALL=(ALL) NOPASSWD: ALL' >...
root@commet:~#
root@commet:~# cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as ...
#
# Please consider adding local content in /etc/sudoers.d...
# directly modifying this file.
#
# See the man page for details on how to write a sudoers...
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/us...
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" dire...
#includedir /etc/sudoers.d
pi ALL=(ALL) NOPASSWD: ALL
ujpadmin ALL=(ALL) NOPASSWD: ALL
root@commet:~#
ujpadmin@commet:~ $ sudo su -
root@commet:~#
root@commet:~# cat /etc/passwd|grep -v false|grep -v nol...
root:x:0:0:root:/root:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
pi:x:1000:1000:,,,:/home/pi:/bin/bash
ujpadmin:x:1001:1001:UJP admin,,,:/home/ujpadmin:/bin/bash
root@commet:~#
root@commet:~# cat /etc/passwd|grep -v false|grep -v nol...
root:x:0:0:root:/root:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
#pi:x:1000:1000:,,,:/home/pi:/bin/bash
ujpadmin:x:1001:1001:UJP admin,,,:/home/ujpadmin:/bin/bash
root@commet:~#
root@commet:~# sudo su - pi
ユーザ 'pi' のパスワードエントリがありません
root@commet:~#
終了行:
*Rapsberry Pi3のRaspbianでユーザの追加と削除を行う
**はじめに
Raspbianにはpiユーザがデフォルトで作成されているが,そ...
pi@commet:~ $ su - root
パスワード:
root@commet:~#
root@commet:~# cat /etc/passwd|grep -v false|grep -v nol...
root:x:0:0:root:/root:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
pi:x:1000:1000:,,,:/home/pi:/bin/bash
root@commet:~#
root@commet:~# userdel -r pi
userdel: user pi is currently used by process 756
root@commet:~#
root@commet:~# adduser ujpadmin
ユーザ `ujpadmin' を追加しています...
新しいグループ `ujpadmin' (1001) を追加しています...
新しいユーザ `ujpadmin' (1001) をグループ `ujpadmin' と...
ホームディレクトリ `/home/ujpadmin' を作成しています...
`/etc/skel' からファイルをコピーしています...
新しい UNIX パスワードを入力してください:
新しい UNIX パスワードを再入力してください:
passwd: パスワードは正しく更新されました
ujpadmin のユーザ情報を変更中
新しい値を入力してください。標準設定値を使うならリターン...
フルネーム []: UJP admin
部屋番号 []:
職場電話番号 []:
自宅電話番号 []:
その他 []:
以上で正しいですか? [Y/n] y
root@commet:~#
root@commet:~# cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as ...
#
# Please consider adding local content in /etc/sudoers.d...
# directly modifying this file.
#
# See the man page for details on how to write a sudoers...
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/us...
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" dire...
#includedir /etc/sudoers.d
pi ALL=(ALL) NOPASSWD: ALL
root@commet:~#
root@commet:~# echo 'ujpadmin ALL=(ALL) NOPASSWD: ALL' >...
root@commet:~#
root@commet:~# cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as ...
#
# Please consider adding local content in /etc/sudoers.d...
# directly modifying this file.
#
# See the man page for details on how to write a sudoers...
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/us...
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" dire...
#includedir /etc/sudoers.d
pi ALL=(ALL) NOPASSWD: ALL
ujpadmin ALL=(ALL) NOPASSWD: ALL
root@commet:~#
ujpadmin@commet:~ $ sudo su -
root@commet:~#
root@commet:~# cat /etc/passwd|grep -v false|grep -v nol...
root:x:0:0:root:/root:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
pi:x:1000:1000:,,,:/home/pi:/bin/bash
ujpadmin:x:1001:1001:UJP admin,,,:/home/ujpadmin:/bin/bash
root@commet:~#
root@commet:~# cat /etc/passwd|grep -v false|grep -v nol...
root:x:0:0:root:/root:/bin/bash
sync:x:4:65534:sync:/bin:/bin/sync
#pi:x:1000:1000:,,,:/home/pi:/bin/bash
ujpadmin:x:1001:1001:UJP admin,,,:/home/ujpadmin:/bin/bash
root@commet:~#
root@commet:~# sudo su - pi
ユーザ 'pi' のパスワードエントリがありません
root@commet:~#
ページ名: