ユーザを作成して、ユーザIDやグループIDを確認。
# adduser hoge Adding user `hoge' ... Adding new group `hoge' (1001) ... Adding new user `hoge' (1001) with group `hoge' ... Creating home directory `/home/hoge' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for hoge Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y # grep -e '^hoge' /etc/passwd hoge:x:1001:1001:,,,:/home/hoge:/bin/bash # grep -e '^hoge' /etc/group hoge:x:1001: # ls -la /home/hoge/ total 20 drwxr-xr-x 2 hoge hoge 4096 *** ** **:** . drwxr-xr-x 9 root root 4096 *** ** **:** .. -rw-r--r-- 1 hoge hoge 220 *** ** **:** .bash_logout -rw-r--r-- 1 hoge hoge 3515 *** ** **:** .bashrc -rw-r--r-- 1 hoge hoge 675 *** ** **:** .profile
一般ユーザからダミーユーザに切り替える。その後いろいろ作業。
$ su - hoge Password: $ cat << 'EOT' | gpg --batch --gen-key Key-Type: RSA Key-Length: 4096 Key-Usage: encrypt sign Subkey-Type: RSA Subkey-Length: 4096 Subkey-Usage: encrypt Name-Real: hoge fuga Name-Email: hoge@example.com Expire-Date: 0 Passphrase: hoge %commit EOT ....+++++ .+++++ .........................+++++ ...+++++ gpg: key 02DF0240 marked as ultimately trusted $ mkdir -p ~/.emacs.d/lisp/wl/; $ cat << 'EOT' > ~/.emacs.d/init.el (add-to-list 'load-path "~/.emacs.d/lisp/wl/") EOT $ zcat /usr/share/doc/wl-beta/examples/ja/dot.wl.gz > ~/.emacs.d/lisp/wl/dot.wl.el $ cat << 'EOT' > ~/.emacs.d/lisp/wl/dot.wl.hoge.el (setq wl-folders-file "~/.emacs.d/lisp/wl/folders") (setq wl-address-file "~/.emacs.d/lisp/wl/address") (setq wl-from "hoge@example.com") (add-hook 'wl-draft-send-hook '(lambda () (mime-edit-set-sign t) )) (setq mime-edit-pgp-signers '("02DF0240")) ; (setq mime-edit-pgp-verbose t) EOT $ cat << 'EOT' > ~/.wl (load "dot.wl.el") (load "dot.wl.hoge.el") EOT $ cat << 'EOT' > ~/.emacs.d/lisp/wl/folders -gmane.linux.debian.user.announce@news.gmane.org -gmane.linux.debian.devel.announce@news.gmane.org -gmane.linux.debian.devel.kernel@news.gmane.org -gmane.linux.debian.user.news@news.gmane.org -gmane.linux.debian.user@news.gmane.org EOT
# deluser --remove-home hoge Looking for files to backup/remove ... Removing files ... Removing user `hoge' ... Warning: group `hoge' has no more members. Done.
# deluser --remove-all-files hoge
$ gpg --with-colons --list-keys --with-fingerprint --with-fingerprint