>N 1 genisis Sat Dec 30 12:47 22/567 "Welcome"
& 1
Message 1:
From genisis Sat Dec 30 12:47:07 2000
Date: Sat, 30 Dec 2000 12:47:07 -0500 (EST)
From: User Genisis
To: test
Subject: Welcome
test,
your account "test" was created.
Have fun!
See also chpass(1), finger(1), passwd(1)
Don't forget that every Friday is pizza day!
再看一下新信息是否被加到了模板文件:
more /etc/adduser.message
#
# Message file for adduser(8)
# comment: "#"
# default variables: $name, $fullname, $password
# other variables: see /etc/adduser.conf after
# line "## DO NOT DELETE THIS LINE!"
#
$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!
| 论坛热门帖子: | [lch203] 写得蛮好的linux学习笔记(10-21) [黑马制造] 学习java的30个目标(10-19) [笑傲股林] 做测试半年了,有点迷茫,应该再学些什么提高自己的测试水平和测试能力呢?(10-19) [udp8589] 大家用google的来吱一声? 用百度的~~也来报道下?(10-18) [沂偌掳兆] 本人总结的一些认为C++比较经典的书籍,希望对大家有用(10-18) |
| TAG标签: | 用户 添加 建立 dlavigne 文件 一个 可以 adduser 我们 |
注册
个人空间
