关于FreeBSD中的toor账号

你可能会发现在你的/etc/passwd文件中存在一个toor的帐户,它就是用来测试root的shell(其实可以不仅仅是shell,还可以是其他的一些东西),任何多root帐户配置的改变最好都要先在toor帐户上测试一下再做。
你可能会发现在你的/etc/passwd文件中存在一个toor的帐户,它就是用来测试root的shell(其实可以不仅仅是shell,还可以是其他的一些东西),任何多root帐户配置的改变最好都要先在toor帐户上测试一下再做。
  下面是从水木的FreeBSD版转的帖子:

发信人: frank (Frank), 信区: FreeBSD
标 题: Toor User
发信站: BBS 水木清华站 (Tue Jan 25 12:32:10 2000)

Newsgroups:
comp.unix.bsd.freebsd.misc

Stephen H. Kapit  wrote:

> toor:*:0:0:Bourne-again Superuser:/root:
> Does anyone know what this is?
> Thanks.
> Stephen

It’s a second root account. Notice it’s disabled (the * in the password
field) and has no shell given to it by default. If you decide to
change root’s shell, one way to use this account is to make sure it’s
working before you change root’s shell, so that if you make a mistake
you can use toor instead. Other people give it the sh shell (root’s
is csh by default) so they have an sh root shell available.

Alternatively, you can delete it altogether, or just leave it alone
in its disabled state.

If you use su -m (or have su aliased to su -m), however, your root
account will keep your user shell. Just keep in mind that if you
boot into single user mode, you want to have a shell that’s in /bin
and doesn’t depend on libraries in /usr (i.e., a shell that’s
statically linked). What you don’t want to do is replace /bin/sh
or /bin/csh with bash or whatever, as bash from /usr/local/bin would
not work in single user mode.

Annelise


※ 来源:·BBS 水木清华站 smth.org·[FROM: 159.226.41.166]