在FreeBSD中添加用户(3)

2008-02-23 08:03:27来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折


$fullname,
your account "$name" was created.
Have fun!
See also chpass(1), finger(1), passwd(1)
看来只有该用户收到了附加的信息,这正如我们所期望的。在离开adduser.message文件之前我还想做更多的例子。我想让用户在他们的欢迎邮件中收到下面这条附加信息:

If you have any problems, contact the administrator at 
admin@thiscompany.com
试一下你自己建立一个账号并把这行加到他们的信息中;你会看到当你以该用户登录时,附加行没有出现在邮件信息中。但是如果你把这行改成:

If you have any problems, contact the administrator at 
admin\@thiscompany.com
那么用户就会收到附加信息了。注意,我们必须用\符号避开@符号,以便正确解释。

最后,让我们看一下刚才建立的adduser.conf文件:

more /etc/adduser.conf

# /etc/adduser.conf - automatic generated by adduser(8)
#
# Note: adduser read *and* write this file
# You may change values, but don't add new things before the
# line "## DO NOT DELETE THIS LINE!"
# use password for new users
# defaultpasswd =  yes | no
defaultpasswd = yes

# copy dotfiles from this dir ("/usr/share/skel" or "no")
dotdir = "/usr/share/skel"

# send this file to new user 
# ("/etc/adduser.message" or "no")
send_message = "/etc/adduser.message"

# config file for adduser ("/etc/adduser.conf")
config = "/etc/adduser.conf"

# logfile ("/var/log/adduser" or "no")
logfile = "/var/log/adduser"

# default HOME directory ("/home")
home = "/home"

# List of directories where shells located
# path = ('/bin', '/usr/bin', '/usr/local/bin')
path = ('/bin', '/usr/bin', '/usr/local/bin')

# common shell list, first element has higher priority
# shellpref = ('bash', 'tcsh', 'ksh', 'csh', 'sh')
shellpref = ('csh', 'sh', 'bash', 'tcsh', 'ksh', 'no', 'date')

# defaultshell if not empty ("bash")
defaultshell = "tcsh"

# defaultgroup ('USER' for same as 
# username or any other valid group)
defaultgroup = USER

# defaultclass if not empty
defaultclass = ""

# new users get this uid (1000)
uid_start = "1000"

## DO NOT DELETE THIS LINE!
## your own variables, see /etc/adduser.message
## end
你可以看到这是个简单的文件,它包含了对adduser工具提示问题的回答。你看到的新信息只是该文件含有addus er记录文件的存放位置。如果看一下这个记录文件,会看到建立账号时的记录:

more /var/log/adduser

2000/12/30 12:24:18 dlavigne:*:1000:1000(dlavigne):Dru Lavigne
2000/12/30 12:47:06 test:*:1001:1001(test):test

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD上的NFS

下一篇:如何使用一块新加的SCSI硬盘?