2005年10月15日
ユーザー/パスワード変更
セキュリティ上、および、自分用にrootのパスワード変更と、一般ユーザーの追加、および、登録済みのユーザー(tmp-kun)の削除。
以降の表記ではユーザー名等はxxxxxで伏せてあります。
rootユーザーのパスワード変更。
passwdで変更。
一般ユーザー(tmp-kun)の変更。
tmp-kunの代わりに通常使用するユーザーを作成します。
tmp-kun@KURO-BOX:~$ su -
Password: xxxxx
KURO-BOX:~# adduser
Enter a username to add: xxxxx
Adding user xxxxx...
Adding new group xxxxx (1001).
Adding new user xxxxx (1001) with group xxxxx.
Creating home directory /home/xxxxx.
Copying files from /etc/skel
Enter new UNIX password: xxxxx
Retype new UNIX password: xxxxx
passwd: password updated successfully
Changing the user information for xxxxx
Enter the new value, or press return for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [y/n] y
作成したユーザーでログインできることの確認。
ログインできた場合、デフォルトの一般ユーザー(tmp-kun)の削除を行います。
xxxxx@KURO-BOX:~$ su
Password:xxxxx
KURO-BOX:/home/xxxxx# deluser --remove-all-files tmp-kun
Looking for files to backup/remove...
Removing files...
Removing user tmp-kun...
done.
--remove-all-filesオプションをつけて、関連ファイルを含めてすべて削除。
メモ
su
id
passwd
投稿者 mituha : 2005年10月15日 14:27