M6是啥意思?

yangyi2000 2010-06-20 02:50:29
最近投了一家汽车公司的招聘,说要掌握M6,嘿嘿,本人一点不懂车,不知道M6是啥意思。请教
我都觉得羞,问这个问题。哎,不懂还是要问嘛,在网上查了下,但还是不太清楚
能具体说说最好。谢了
...全文
458 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
DragonBill 2010-06-26
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 zhzxlc_06 的回复:]
我知道M4
CS里的一把枪!
[/Quote]

嗯,有理, M6类推就是M4的加强版
guangdongmutou 2010-06-26
  • 打赏
  • 举报
回复
楼主应聘什么职位,汽车公司会不会是让你去卖车- -!!!
yangyi2000 2010-06-22
  • 打赏
  • 举报
回复
"以下网页中出现了M6:

http://myweb.polyu.edu.hk/~mmdsham/Schedule.htm

可能是指一种名为Marc的CAE软件,见:
http://www.mscsoftware.com/Products/CAE-Tools/Default.aspx"
这个可能有点是。。。
jianuMan 2010-06-22
  • 打赏
  • 举报
回复
gps 定位系统吧
arong1234 2010-06-21
  • 打赏
  • 举报
回复
马6?马自达得一个型号,你投得是马自达相关得汽车公司?[Quote=引用楼主 yangyi2000 的回复:]
最近投了一家汽车公司的招聘,说要掌握M6,嘿嘿,本人一点不懂车,不知道M6是啥意思。请教
我都觉得羞,问这个问题。哎,不懂还是要问嘛,在网上查了下,但还是不太清楚
能具体说说最好。谢了
[/Quote]
LaoMaoing 2010-06-21
  • 打赏
  • 举报
回复
dddddddddddddd
logiciel 2010-06-21
  • 打赏
  • 举报
回复
以下网页中出现了M6:

http://myweb.polyu.edu.hk/~mmdsham/Schedule.htm

可能是指一种名为Marc的CAE软件,见:
http://www.mscsoftware.com/Products/CAE-Tools/Default.aspx
philipzeng 2010-06-21
  • 打赏
  • 举报
回复
搜狐输入法M6就是╮(╯_╰)╭。
yzx714 2010-06-21
  • 打赏
  • 举报
回复
我只知道m4,一个宏文本处理编程语言,以及一种卡宾枪
ForestDB 2010-06-21
  • 打赏
  • 举报
回复
好像就是M的一个型号而已。
向立天 2010-06-21
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 arong1234 的回复:]
马6?马自达得一个型号,你投得是马自达相关得汽车公司?

引用楼主 yangyi2000 的回复:
最近投了一家汽车公司的招聘,说要掌握M6,嘿嘿,本人一点不懂车,不知道M6是啥意思。请教
我都觉得羞,问这个问题。哎,不懂还是要问嘛,在网上查了下,但还是不太清楚
能具体说说最好。谢了
[/Quote]
可能真的是马6
xiaoleisme 2010-06-21
  • 打赏
  • 举报
回复
哈哈,第一次听。。
lqbk5 2010-06-21
  • 打赏
  • 举报
回复
只是个马甲
yangyi2000 2010-06-21
  • 打赏
  • 举报
回复
在网上随便一查都出现宝马M6,比亚迪M6,马自达M6等等。。貌似是技术性的,谁来解释下,。。。??
forster 2010-06-21
  • 打赏
  • 举报
回复
马6?
yangyi2000 2010-06-21
  • 打赏
  • 举报
回复
好像你们说的都不对,,
我是学电子信息的,投了宇通,人家说要掌握M6和CATIA. 查了半天不知道M6是啥。。。
chaoliu1024 2010-06-20
  • 打赏
  • 举报
回复
我知道M4
CS里的一把枪!
mingci 2010-06-20
  • 打赏
  • 举报
回复
不太清楚。。
liutengfeigo 2010-06-20
  • 打赏
  • 举报
回复
M6。。。。。
集合了 所有的 Unix命令大全 登陆服务器时输入 公帐号 openlab-open123 telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss 老师测评网址 http://172.16.0.198:8080/poll/ 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ 一、注意事项 命令和参数之间必需用空格隔开,参数和参数之间也必需用空格隔开。 一行不能超过256个字符;大小写有区分。 二、特殊字符含义 文件名以“.”开头的都是隐藏文件/目录,只需在文件/目录名前加“.”就可隐藏它。 ~/ 表示主目录。 ./ 当前目录(一个点)。 ../ 上一级目录(两个点)。 ; 多个命令一起用。 > >> 输出重定向 。将一个命令的输出内容写入到一个文件里面。如果该文件存在, 就将该文件的内容覆盖; 如果不存在就先创建该文件, 然后再写入内容。 输出重定向,意思就是说,将原来屏幕输出变为文件输出,即将内容输到文件中。 < << 输入重定向。 本来命令是通过键盘得到输入的,但是用小于号,就能够使命令从文件中得到输入。 \ 表示未写完,回车换行再继续。 * 匹配零个或者多个字符。 ? 匹配一个字符。 [] 匹配中括号里的内容[a-z][A-Z][0-9]。 ! 事件。 $ 取环境变量的值。 | 管道。把前一命令的输出作为后一命令的输入,把几个命令连接起来。 |经常跟tee连用,tee 把内容保存到文档并显示出来。 三、通用后接命令符 -a 所有(all)。 -e 所有(every),比a更详细。 -f 取消保护。 -i 添加提示。 -p 强制执行。 -r 目录管理。 分屏显示的中途操作 空格 继续打开下一屏; 回车 继续打开下一行; b 另外开上一屏; f 另外开下一屏; h 帮助; q或Ctrl+C 退出; /字符串 从上往下查找匹配的字符串; ?字符串 从下往上查找匹配的字符串; n 继续查找。 四、退出命令 exit 退出; DOS内部命令 用于退出当前的命令处理器(COMMAND.COM) 恢复前一个命令处理器。 Ctrl+d 跟exit一样效果,表中止本次操作。 logout 当csh时可用来退出,其他shell不可用。 clear 清屏,清除(之前的内容并未删除,只是没看到,拉回上面可以看回)。 五、目录管理命令 pwd 显示当前所在目录,打印当前目录的绝对路径。 cd 进入某目录,DOS内部命令 显示或改变当前目录。 cd回车/cd ~ 都是回到自己的主目录。 cd . 当前目录(空格再加一个点)。 cd .. 回到上一级目录(空格再加两个点)。 cd ../.. 向上两级。 cd /user/s0807 从绝对路径去到某目录。 cd ~/s0807 直接进入主目录下的某目录(“cd ~"相当于主目录的路径的简写)。 ls 显示当前目录的所有目录和文件。 用法 ls [-aAbcCdeEfFghHilLmnopqrRstux1@] [file...] ls /etc/ 显示某目录下的所有文件和目录,如etc目录下的。 ls -l (list)列表显示文件(默认按文件名排序), 显示文件的权限、硬链接数(即包含文件数,普通文件是1,目录1+)、用户、组名、大小、修改日期、文件名。 ls -t (time)按修改时间排序,显示目录和文件。 ls -lt 是“-l”和“-t”的组合,按时间顺序显示列表。 ls -F 显示文件类型,目录“/ ”结尾;可执行文件“*”结尾;文本文件(none),没有结尾。 ls -R 递归显示目录结构。即该目录下的文件和各个副目录下的文件都一一显示。 ls -a 显示所有文件,包括隐藏文件。 文件权限 r 读权限。对普通文件来说,是读取该文件的权限;对目录来说,是获得该目录下的文件信息。 w 写权限。对文件,是修改;对目录,是增删文件与子目录。 (注 删除没有写权限的文件可以用 rm -f ,这是为了操作方便,是人性化的设计)。 x 执行权限;对目录,是进入该目录 - 表示没有权限 形式 - rw- r-- r-- 其中 第一个是文件类型(-表普通文件,d表目录,l表软链接文件) 第2~4个是属主,生成文件时登录的人,权限最高,用u表示 第5~7个是属组,系统管理员分配的同组的一个或几个人,用g表示 第8~10个是其他人,除属组外的人,用o表示 所有人,包括属主、属组及其他人,用a表示 chmod 更改权限; 用法 chmod [-fR] <绝对模式> 文件 ... chmod [-fR] <符号模式列表> 文件 ... 其中 <符号模式列表> 是一个用逗号分隔的表 [ugoa]{+|-|=}[rwxXlstugo] chmod u+rw 给用户加权限。同理,u-rw也可以减权限。 chmod u=rw 给用户赋权限。与加权限不一样,赋权限有覆盖的效果。 主要形式有如下几种 chmod u+rw chmod u=rw chmod u+r, u+w chmod u+rw,g+w, o+r chmod 777( 用数字的方式设置权限是最常用的) 数字表示权限时,各数位分别表示属主、属组及其他人; 其中,1是执行权(Execute),2是写权限(Write),4是读权限(Read), 具体权限相当于三种权限的数相加,如7=1+2+4,即拥有读写和执行权。 另外,临时文件/目录的权限为rwt,可写却不可删,关机后自动删除;建临时目录:chmod 777 目录名,再chmod +t 目录名。 id 显示用户有效的uid(用户字)和gid(组名) 用法 id [-ap] [user] id 显示自己的。 id root 显示root的。 id -a root 显示用户所在组的所有组名(如root用户,是所有组的组员) df 查看文件系统,查看数据区 用法 df [-F FSType] [-abeghklntVvZ] [-o FSType 特定选项] [目录 | 块设备 | 资源] df -k 以kbytes显示文件大小的查看文件系统方式 六、显示文件内容 more 分屏显示文件的内容。 用法 more [-cdflrsuw] [-行] [+行号] [+/模式] [文件名 ...]。 显示7个信息:用户名 密码 用户id(uid) 组id(gid) 描述信息(一般为空) 用户主目录 login shell(登录shell) cat 显示文件内容,不分屏(一般用在小文件,大文件显示不下);合并文件,仅在屏幕上合并,并不改变原文件。 用法 cat [ -usvtebn ] [-|文件] ... tail 实时监控文件,一般用在日志文件,可以只看其中的几行。 用法 tail [+/-[n][lbc][f]] [文件] tail [+/-[n][l][r|f]] [文件] 七、文件/目录的增删 echo 显示一行内容。 touch 如果文件/目录不存在,则创建新文件/目录;如果文件存在,那么就是更新该文件的最后访问时间, 用法 touch [-acm] [-r ref_file] 文件... touch [-acm] [MMDDhhmm[yy]] 文件... touch [-acm] [-t [[CC]YY]MMDDhhmm[.SS]] file... mkdir 创建目录(必须有创建目录的权限) 用法 mkdir [-m 模式] [-p] dirname ... mkdir dir1/dir2 在dir1下建dir2 mkdir dir13 dir4 dir5 连建多个 mkdir ~/games 用户主目录下建(默认在当前目录下创建) mkdir -p dir6/dir7/dir8 强制创建dir8;若没有前面的目录,会自动创建dir6和dir7。 不用-p时,若没有dir6/dir7,则创建失败。 cp 复制文件/目录 cp 源文件 目标文件 复制文件;若已有文件则覆盖 cp -r 源目录 目标目录 复制目录;若已有目录则把源目录复制到目标目录下, 没有目标目录时,相当于完全复制源目录,只是文件名不同。 cp beans apple dir2 把beans、apple文件复制到dir2目录下 cp -i beans apple 增加是否覆盖的提示 mv 移动或重命名文件/目录 用法 mv [-f] [-i] f1 f2 mv [-f] [-i] f1 ... fn d1 mv [-f] [-i] d1 d2 mv 源文件名 目标文件名 若目标文件名还没有,则是源文件重命名为目标文件;若目标文件已存在,则源文件覆盖目标文件。 mv 源文件名 目标目录 移动文件 mv 源目录 目标目录 若目标目录不存在,则源目录重命名;若目标目录已存在,则源目录移动到目标目录下。 rm 删除文件/目录 用法 rm [-fiRr] 文件 ... rm 文件名 删除文件。 rm -r 目录名 删除目录。 rm –f 文件 只要是该文件或者目录的拥有者,无论是否有权限删除,都可以用这个命令参数强行删除。 rm -rf * 删除所有文件及目录 rmdir 删除空目录。只可以删除空目录。 ln 创建硬链接或软链接,硬链接=同一文件的多个名字;软链接=快捷方式 用法 ln [-f] [-n] [-s] f1 [f2] ln [-f] [-n] [-s] f1 ... fn d1 ln [-f] [-n] -s d1 d2 ln file1 file1.ln 创建硬链接。感觉是同一文件,删除一个,对另一个没有影响;须两个都删除才算删除。 ln -s file1 file1.sln 创建软链接。可跨系统操作,冲破操作权限;也是快捷方式。 八、时间显示 date 显示时间,精确到秒 用法 date [-u] mmddHHMM[[cc]yy][.SS] date [-u] [+format] date -a [-]sss[.fff] cal 显示日历 cal 9 2008 显示2008年9月的日历; cal 显示当月的 用法 cal [ [月] 年 ] 九、帮助 man 帮助( format and display the on-line manual pages) 用法 man [-] [-adFlrt] [-M 路径] [-T 宏软件包] [-s 段] 名称 ... man [-] [-adFlrt] [-M path] [-T macro-package] [-s section] name... man [-M 路径] -k 关键字 ... man [-M 路径] -f 文件 ... awk 按一定格式输出(pattern scanning and processing language) 用法 awk [-Fc] [-f 源代码 | 'cmds'] [文件] 十、vi 底行模式 /? 命令模式 i a o 输入模式 vi 的使用方法 1、光标 h 左 j 下 k 上 l 右 set nu 显示行号(set nonu) 21 光标停在指定行 21G 第N行 (G到文件尾,1G到文件头) 如果要将光标移动到文件第一行,那么就按 1G H 屏幕头 M 屏幕中间 L 屏幕底 ^ 或 shift+6 行首 $ 或 shift+4 行尾 Ctrl+f 下翻 Ctrl+b 上翻 2、输入 (输入模式) o 光标往下换一行 O (大写字母o)在光标所在行上插入一空行 i 在光标所在位置的前面插入字母 a 在光标所在位置的后面插入一个新字母 退出插入状态。 3、修改替换 r 替换一个字符 dd 删除行,剪切行 (5dd删除5行) 5,10d 删除 5 至 10 行(包括第 5行和第 10 行) x 删除一个字符 dw 删除词,剪切词。 ( 3dw删除 3 单词) cw 替换一个单词。 (cw 和 dw 的区别 cw 删除某一个单词后直接进入编辑模式,而dw删除词后仍处于命令模式) cc 替换一行 C 替换从光标到行尾 yy 复制行 (用法同下的 Y ,见下行) Y 将光标移动到要复制行位置,按yy。当你想粘贴的时候,请将光标移动到你想复制的位置的前一个位置,然后按 p yw 复制词 p 当前行下粘贴 1,2co3 复制行1,2在行3之后 4,5m6 移动行4,5在行6之后 u 当你的前一个命令操作是一个误操作的时候,那么可以按一下 u键,即可复原。只能撤销一次 r file2 在光标所在处插入另一个文件 ~ 将字母变成大写 J 可以将当前行与下一行连接起来 /字符串 从上往下找匹配的字符串 ?字符串 从下往上找匹配的字符串 n 继续查找 1,$s/旧串/新串/g 替换全文(或者 %s/旧串/新串/g) (1表示从第一行开始) 没有g则只替换一次,加g替换所有 3、存盘和退出 w 存盘 w newfile 存成新文件 wq 存盘再退出VI(或者ZZ或 X) q! 强行退出不存盘 查看用户 users 显示在线用户(仅显示用户名)。 who 显示在线用户,但比users更详细,包括用户名、终端号、登录时间、IP地址。 who am i 仅显示自己,(但包括用户名、端口、登录时间、IP地址;信息量=who)。 whoami 也仅显示自己,但只有用户名(仅显示自己的有效的用户名)。 w 显示比who更多内容,还包括闲置时间、占CPU、平均占用CPU、执行命令。 用法 w [ -hlsuw ] [ 用户 ] su 改变用户,需再输入密码。 用法 su [-] [ username [ arg ... ] ] su - 相当于退出再重新登录。 查找 find 查找文件 用法 find [-H | -L] 路径列表 谓词列表 find / -name perl 从根目录开始查找名为perl的文件。 find . -mtime 10 -print 从当前目录查找距离现在10天时修改的文件,显示在屏幕上。 (注 “10”表示第10天的时候;如果是“+10”表示10天以外的范围;“-10”表示10天以内的范围。) grep 文件中查找字符;有过滤功能,只列出想要的内容 用法 grep -hblcnsviw 模式 文件 . . . 如 grep abc /etc/passwd 在passwd文件下找abc字符 wc 统计 -l 统计行数; -w统计单词数; -c 统计字符数 如 grep wang /etc/passwd|wc -l 统计passwd文件含“wang”的行数 du 查看目录情况 如 du -sk * 不加-s会显示子目录,-k按千字节排序 用法 du [-a] [-d] [-h|-k] [-r] [-o|-s] [-H|-L] [文件...] 进程管理 ps 显示进程。 用法 ps [ -aAdeflcjLPyZ ] [ -o 格式 ] [ -t 项列表 ] [ -u 用户列表 ] [ -U 用户列表 ] [ -G 组列表 ] [ -p 进程列表 ] [ -g 程序组列表 ] [ -s 标识符列表 ] [ -z 区域列表 ] ps 显示自己的进程。 ps -e 显示每个进程,包括空闲进程。 ps -f 显示详情。 ps -ef 组合-e和-f,所有进程的详情。 ps -U uidlist(用户列表) 具体查看某人的进程。 kill pkill sleep jobs 用法 jobs [-l ] fg %n bg %n stop %n 挂起(仅csh能用) Ctrl+C Ctrl+Z 网络链接 ping usage ping host [timeout] usage ping -s [-l | U] [adLnRrv] [-A addr_family] [-c traffic_class] [-g gateway [-g gateway ...]] [-F flow_label] [-I interval] [-i interface] [-P tos] [-p port] [-t ttl] host [data_size] [npackets] ifconfig -a /sbin/ifconfig 查看本机的IP地址 netstat -rn rlogin ftp 帮助文件 [sd0807@localhost ~]$ help GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu) These shell commands are defined internally. Type `help' to see this list. Type `help name' to find out more about the function `name'. Use `info bash' to find out more about the shell in general. Use `man -k' or `info' to find out more about commands not in this list. A star (*) next to a name means that the command is disabled. JOB_SPEC [&] (( expression )) . filename [arguments] [ arg... ] [[ expression ]] alias [-p] [name[=value] ... ] bg [job_spec ...] bind [-lpvsPVS] [-m keymap] [-f fi break [n] builtin [shell-builtin [arg ...]] caller [EXPR] case WORD in [PATTERN [| PATTERN]. cd [-L|-P] [dir] command [-pVv] command [arg ...] compgen [-abcdefgjksuv] [-o option complete [-abcdefgjksuv] [-pr] [-o continue [n] declare [-afFirtx] [-p] [name[=val dirs [-clpv] [+N] [-N] disown [-h] [-ar] [jobspec ...] echo [-neE] [arg ...] enable [-pnds] [-a] [-f filename] eval [arg ...] exec [-cl] [-a name] file [redirec exit [n] export [-nf] [name[=value] ...] or false fc [-e ename] [-nlr] [first] [last fg [job_spec] for NAME [in WORDS ... ;] do COMMA for (( exp1; exp2; exp3 )); do COM function NAME { COMMANDS ; } or NA getopts optstring name [arg] hash [-lr] [-p pathname] [-dt] [na help [-s] [pattern ...] history [-c] [-d offset] [n] or hi if COMMANDS; then COMMANDS; [ elif jobs [-lnprs] [jobspec ...] or job kill [-s sigspec | -n signum | -si let arg [arg ...] local name[=value] ... logout popd [+N | -N] [-n] printf [-v var] format [arguments] pushd [dir | +N | -N] [-n] pwd [-LP] read [-ers] [-u fd] [-t timeout] [ readonly [-af] [name[=value] ...] return [n] select NAME [in WORDS ... ;] do CO set [--abefhkmnptuvxBCHP] [-o option] [arg ...] shift [n] shopt [-pqsu] [-o long-option] opt source filename [arguments] suspend [-f] test [expr] time [-p] PIPELINE times trap [-lp] [arg signal_spec ...] true type [-afptP] name [name ...] typeset [-afFirtx] [-p] name[=valu ulimit [-SHacdfilmnpqstuvx] [limit umask [-p] [-S] [mode] unalias [-a] name [name ...] unset [-f] [-v] [name ...] until COMMANDS; do COMMANDS; done variables - Some variable names an wait [n] while COMMANDS; do COMMANDS; done { COMMANDS ; } 输入 man help BASH_BUILTINS(1) BASH_BUILTINS(1) NAME bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen, complete, continue, declare, dirs, disown, echo, enable, eval, exec, exit, export, fc, fg, getopts, hash, help, history, jobs, kill, let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set, shift, shopt, source, suspend, test, times, trap, type, typeset, ulimit, umask, una- lias, unset, wait - bash built-in commands, see bash(1) BASH BUILTIN COMMANDS Unless otherwise noted, each builtin command documented in this section as accepting options preceded by - accepts -- to signify the end of the options. For example, the :, true, false, and test builtins do not accept options. : [arguments] No effect; the command does nothing beyond expanding arguments and performing any specified redirections. A zero exit code is returned. . filename [arguments] source filename [arguments] Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename. If filename does not contain a slash, file names in PATH are used to find the directory containing file- name. The file searched for in PATH need not be executable. When bash is not in posix mode, the current directory is searched if no file is found in PATH. If the sourcepath option to the shopt builtin command is turned off, the PATH is not searched. If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read. alias [-p] [name[=value] ...] Alias with no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output. When arguments are supplied, an alias is defined for each name whose value is given. A trailing space in value causes the next word to be checked for alias substitution when the alias is expanded. For each name in the argument list for which no value is supplied, the name and value of the alias is printed. Alias returns true unless a name is given for which no alias has been defined. bg [jobspec ...] Resume each suspended job jobspec in the background, as if it had been started with &. If jobspec is not present, the shell’s notion of the current job is used. bg jobspec returns 0 unless run when job control is disabled or, when run with job con- trol enabled, any specified jobspec was not found or was started without job control. bind [-m keymap] [-lpsvPSV] bind [-m keymap] [-q function] [-u function] [-r keyseq] bind [-m keymap] -f filename bind [-m keymap] -x keyseq:shell-command bind [-m keymap] keyseq:function-name bind readline-command Display current readline key and function bindings, bind a key sequence to a readline function or macro, or set a readline variable. Each non-option argument is a command as it would appear in .inputrc, but each binding or command must be passed as a sepa- rate argument; e.g., ’"\C-x\C-r": re-read-init-file’. Options, if supplied, have the following meanings: -m keymap Use keymap as the keymap to be affected by the subsequent bindings. Accept- able keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert. vi is equivalent to vi-command; emacs is equivalent to emacs-standard. -l List the names of all readline functions. -p Display readline function names and bindings in such a way that they can be re-read. -P List current readline function names and bindings. -v Display readline variable names and values in such a way that they can be re- read. -V List current readline variable names and values. -s Display readline key sequences bound to macros and the strings they output in such a way that they can be re-read. -S Display readline key sequences bound to macros and the strings they output. -f filename Read key bindings from filename. -q function Query about which keys invoke the named function. -u function Unbind all keys bound to the named function. -r keyseq Remove any current binding for keyseq. -x keyseq:shell-command Cause shell-command to be executed whenever keyseq is entered. The return value is 0 unless an unrecognized option is given or an error occurred. break [n] Exit from within a for, while, until, or select loop. If n is specified, break n levels. n must be ≥ 1. If n is greater than the number of enclosing loops, all enclosing loops are exited. The return value is 0 unless the shell is not executing a loop when break is executed. builtin shell-builtin [arguments] Execute the specified shell builtin, passing it arguments, and return its exit sta- tus. This is useful when defining a function whose name is the same as a shell builtin, retaining the functionality of the builtin within the function. The cd builtin is commonly redefined this way. The return status is false if shell-builtin is not a shell builtin command. cd [-L|-P] [dir] Change the current directory to dir. The variable HOME is the default dir. The variable CDPATH defines the search path for the directory containing dir. Alterna- tive directory names in CDPATH are separated by a colon (:). A null directory name in CDPATH is the same as the current directory, i.e., ‘‘.’’. If dir begins with a slash (/), then CDPATH is not used. The -P option says to use the physical directory structure instead of following symbolic links (see also the -P option to the set builtin command); the -L option forces symbolic links to be followed. An argument of - is equivalent to $OLDPWD. If a non-empty directory name from CDPATH is used, or if - is the first argument, and the directory change is successful, the absolute path- name of the new working directory is written to the standard output. The return value is true if the directory was successfully changed; false otherwise. caller [expr] Returns the context of any active subroutine call (a shell function or a script exe- cuted with the . or source builtins. Without expr, caller displays the line number and source filename of the current subroutine call. If a non-negative integer is supplied as expr, caller displays the line number, subroutine name, and source file corresponding to that position in the current execution call stack. This extra information may be used, for example, to print a stack trace. The current frame is frame 0. The return value is 0 unless the shell is not executing a subroutine call or expr does not correspond to a valid position in the call stack. command [-pVv] command [arg ...] Run command with args suppressing the normal shell function lookup. Only builtin com- mands or commands found in the PATH are executed. If the -p option is given, the search for command is performed using a default value for PATH that is guaranteed to find all of the standard utilities. If either the -V or -v option is supplied, a description of command is printed. The -v option causes a single word indicating the command or file name used to invoke command to be displayed; the -V option produces a more verbose description. If the -V or -v option is supplied, the exit status is 0 if command was found, and 1 if not. If neither option is supplied and an error occurred or command cannot be found, the exit status is 127. Otherwise, the exit status of the command builtin is the exit status of command. compgen [option] [word] Generate possible completion matches for word according to the options, which may be any option accepted by the complete builtin with the exception of -p and -r, and write the matches to the standard output. When using the -F or -C options, the vari- ous shell variables set by the programmable completion facilities, while available, will not have useful values. The matches will be generated in the same way as if the programmable completion code had generated them directly from a completion specification with the same flags. If word is specified, only those completions matching word will be displayed. The return value is true unless an invalid option is supplied, or no matches were generated. complete [-abcdefgjksuv] [-o comp-option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] name [name ...] complete -pr [name ...] Specify how arguments to each name should be completed. If the -p option is sup- plied, or if no options are supplied, existing completion specifications are printed in a way that allows them to be reused as input. The -r option removes a completion specification for each name, or, if no names are supplied, all completion specifica- tions. The process of applying these completion specifications when word completion is attempted is described above under Programmable Completion. Other options, if specified, have the following meanings. The arguments to the -G, -W, and -X options (and, if necessary, the -P and -S options) should be quoted to protect them from expansion before the complete builtin is invoked. -o comp-option The comp-option controls several aspects of the compspec’s behavior beyond the simple generation of completions. comp-option may be one of: bashdefault Perform the rest of the default bash completions if the compspec gen- erates no matches. default Use readline’s default filename completion if the compspec generates no matches. dirnames Perform directory name completion if the compspec generates no matches. filenames Tell readline that the compspec generates filenames, so it can per- form any filename-specific processing (like adding a slash to direc- tory names or suppressing trailing spaces). Intended to be used with shell functions. nospace Tell readline not to append a space (the default) to words completed at the end of the line. plusdirs After any matches defined by the compspec are generated, directory name completion is attempted and any matches are added to the results of the other actions. -A action The action may be one of the following to generate a list of possible comple- tions: alias Alias names. May also be specified as -a. arrayvar Array variable names. binding Readline key binding names. builtin Names of shell builtin commands. May also be specified as -b. command Command names. May also be specified as -c. directory Directory names. May also be specified as -d. disabled Names of disabled shell builtins. enabled Names of enabled shell builtins. export Names of exported shell variables. May also be specified as -e. file File names. May also be specified as -f. function Names of shell functions. group Group names. May also be specified as -g. helptopic Help topics as accepted by the help builtin. hostname Hostnames, as taken from the file specified by the HOSTFILE shell variable. job Job names, if job control is active. May also be specified as -j. keyword Shell reserved words. May also be specified as -k. running Names of running jobs, if job control is active. service Service names. May also be specified as -s. setopt Valid arguments for the -o option to the set builtin. shopt Shell option names as accepted by the shopt builtin. signal Signal names. stopped Names of stopped jobs, if job control is active. user User names. May also be specified as -u. variable Names of all shell variables. May also be specified as -v. -G globpat The filename expansion pattern globpat is expanded to generate the possible completions. -W wordlist The wordlist is split using the characters in the IFS special variable as delimiters, and each resultant word is expanded. The possible completions are the members of the resultant list which match the word being completed. -C command command is executed in a subshell environment, and its output is used as the possible completions. -F function The shell function function is executed in the current shell environment. When it finishes, the possible completions are retrieved from the value of the COMPREPLY array variable. -X filterpat filterpat is a pattern as used for filename expansion. It is applied to the list of possible completions generated by the preceding options and argu- ments, and each completion matching filterpat is removed from the list. A leading ! in filterpat negates the pattern; in this case, any completion not matching filterpat is removed. -P prefix prefix is added at the beginning of each possible completion after all other options have been applied. -S suffix suffix is appended to each possible completion after all other options have been applied. The return value is true unless an invalid option is supplied, an option other than -p or -r is supplied without a name argument, an attempt is made to remove a comple- tion specification for a name for which no specification exists, or an error occurs adding a completion specification. continue [n] Resume the next iteration of the enclosing for, while, until, or select loop. If n is specified, resume at the nth enclosing loop. n must be ≥ 1. If n is greater than the number of enclosing loops, the last enclosing loop (the ‘‘top-level’’ loop) is resumed. The return value is 0 unless the shell is not executing a loop when con- tinue is executed. declare [-afFirtx] [-p] [name[=value] ...] typeset [-afFirtx] [-p] [name[=value] ...] Declare variables and/or give them attributes. If no names are given then display the values of variables. The -p option will display the attributes and values of each name. When -p is used, additional options are ignored. The -F option inhibits the display of function definitions; only the function name and attributes are printed. If the extdebug shell option is enabled using shopt, the source file name and line number where the function is defined are displayed as well. The -F option implies -f. The following options can be used to restrict output to variables with the specified attribute or to give variables attributes: -a Each name is an array variable (see Arrays above). -f Use function names only. -i The variable is treated as an integer; arithmetic evaluation (see ARITHMETIC EVALUATION ) is performed when the variable is assigned a value. -r Make names readonly. These names cannot then be assigned values by subsequent assignment statements or unset. -t Give each name the trace attribute. Traced functions inherit the DEBUG and RETURN traps from the calling shell. The trace attribute has no special mean- ing for variables. -x Mark names for export to subsequent commands via the environment. Using ‘+’ instead of ‘-’ turns off the attribute instead, with the exception that +a may not be used to destroy an array variable. When used in a function, makes each name local, as with the local command. If a variable name is followed by =value, the value of the variable is set to value. The return value is 0 unless an invalid option is encountered, an attempt is made to define a function using ‘‘-f foo=bar’’, an attempt is made to assign a value to a readonly variable, an attempt is made to assign a value to an array variable without using the compound assignment syntax (see Arrays above), one of the names is not a valid shell variable name, an attempt is made to turn off readonly status for a readonly variable, an attempt is made to turn off array status for an array variable, or an attempt is made to display a non-exis- tent function with -f. dirs [-clpv] [+n] [-n] Without options, displays the list of currently remembered directories. The default display is on a single line with directory names separated by spaces. Directories are added to the list with the pushd command; the popd command removes entries from the list. +n Displays the nth entry counting from the left of the list shown by dirs when invoked without options, starting with zero. -n Displays the nth entry counting from the right of the list shown by dirs when invoked without options, starting with zero. -c Clears the directory stack by deleting all of the entries. -l Produces a longer listing; the default listing format uses a tilde to denote the home directory. -p Print the directory stack with one entry per line. -v Print the directory stack with one entry per line, prefixing each entry with its index in the stack. The return value is 0 unless an invalid option is supplied or n indexes beyond the end of the directory stack. disown [-ar] [-h] [jobspec ...] Without options, each jobspec is removed from the table of active jobs. If the -h option is given, each jobspec is not removed from the table, but is marked so that SIGHUP is not sent to the job if the shell receives a SIGHUP. If no jobspec is present, and neither the -a nor the -r option is supplied, the current job is used. If no jobspec is supplied, the -a option means to remove or mark all jobs; the -r option without a jobspec argument restricts operation to running jobs. The return value is 0 unless a jobspec does not specify a valid job. echo [-neE] [arg ...] Output the args, separated by spaces, followed by a newline. The return status is always 0. If -n is specified, the trailing newline is suppressed. If the -e option is given, interpretation of the following backslash-escaped characters is enabled. The -E option disables the interpretation of these escape characters, even on systems where they are interpreted by default. The xpg_echo shell option may be used to dynamically determine whether or not echo expands these escape characters by default. echo does not interpret -- to mean the end of options. echo interprets the following escape sequences: \a alert (bell) \b backspace \c suppress trailing newline \e an escape character \f form feed \n new line \r carriage return \t horizontal tab \v vertical tab \\ backslash \0nnn the eight-bit character whose value is the octal value nnn (zero to three octal digits) \nnn the eight-bit character whose value is the octal value nnn (one to three octal digits) \xHH the eight-bit character whose value is the hexadecimal value HH (one or two hex digits) enable [-adnps] [-f filename] [name ...] Enable and disable builtin shell commands. Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without specifying a full pathname, even though the shell normally searches for builtins before disk commands. If -n is used, each name is disabled; otherwise, names are enabled. For example, to use the test binary found via the PATH instead of the shell builtin version, run ‘‘enable -n test’’. The -f option means to load the new builtin command name from shared object filename, on systems that support dynamic loading. The -d option will delete a builtin previously loaded with -f. If no name arguments are given, or if the -p option is supplied, a list of shell builtins is printed. With no other option arguments, the list consists of all enabled shell builtins. If -n is supplied, only disabled builtins are printed. If -a is supplied, the list printed includes all builtins, with an indication of whether or not each is enabled. If -s is supplied, the output is restricted to the POSIX special builtins. The return value is 0 unless a name is not a shell builtin or there is an error loading a new builtin from a shared object. eval [arg ...] The args are read and concatenated together into a single command. This command is then read and executed by the shell, and its exit status is returned as the value of eval. If there are no args, or only null arguments, eval returns 0. exec [-cl] [-a name] [command [arguments]] If command is specified, it replaces the shell. No new process is created. The arguments become the arguments to command. If the -l option is supplied, the shell places a dash at the beginning of the zeroth arg passed to command. This is what login(1) does. The -c option causes command to be executed with an empty environ- ment. If -a is supplied, the shell passes name as the zeroth argument to the exe- cuted command. If command cannot be executed for some reason, a non-interactive shell exits, unless the shell option execfail is enabled, in which case it returns failure. An interactive shell returns failure if the file cannot be executed. If command is not specified, any redirections take effect in the current shell, and the return status is 0. If there is a redirection error, the return status is 1. exit [n] Cause the shell to exit with a status of n. If n is omitted, the exit status is that of the last command executed. A trap on EXIT is executed before the shell termi- nates. export [-fn] [name[=word]] ... export -p The supplied names are marked for automatic export to the environment of subsequently executed commands. If the -f option is given, the names refer to functions. If no names are given, or if the -p option is supplied, a list of all names that are exported in this shell is printed. The -n option causes the export property to be removed from each name. If a variable name is followed by =word, the value of the variable is set to word. export returns an exit status of 0 unless an invalid option is encountered, one of the names is not a valid shell variable name, or -f is sup- plied with a name that is not a function. fc [-e ename] [-nlr] [first] [last] fc -s [pat=rep] [cmd] Fix Command. In the first form, a range of commands from first to last is selected from the history list. First and last may be specified as a string (to locate the last command beginning with that string) or as a number (an index into the history list, where a negative number is used as an offset from the current command number). If last is not specified it is set to the current command for listing (so that ‘‘fc -l -10’’ prints the last 10 commands) and to first otherwise. If first is not speci- fied it is set to the previous command for editing and -16 for listing. The -n option suppresses the command numbers when listing. The -r option reverses the order of the commands. If the -l option is given, the commands are listed on standard output. Otherwise, the editor given by ename is invoked on a file contain- ing those commands. If ename is not given, the value of the FCEDIT variable is used, and the value of EDITOR if FCEDIT is not set. If neither variable is set, is used. When editing is complete, the edited commands are echoed and executed. In the second form, command is re-executed after each instance of pat is replaced by rep. A useful alias to use with this is ‘‘r="fc -s"’’, so that typing ‘‘r cc’’ runs the last command beginning with ‘‘cc’’ and typing ‘‘r’’ re-executes the last command. If the first form is used, the return value is 0 unless an invalid option is encoun- tered or first or last specify history lines out of range. If the -e option is sup- plied, the return value is the value of the last command executed or failure if an error occurs with the temporary file of commands. If the second form is used, the return status is that of the command re-executed, unless cmd does not specify a valid history line, in which case fc returns failure. fg [jobspec] Resume jobspec in the foreground, and make it the current job. If jobspec is not present, the shell’s notion of the current job is used. The return value is that of the command placed into the foreground, or failure if run when job control is dis- abled or, when run with job control enabled, if jobspec does not specify a valid job or jobspec specifies a job that was started without job control. getopts optstring name [args] getopts is used by shell procedures to parse positional parameters. optstring con- tains the option characters to be recognized; if a character is followed by a colon, the option is expected to have an argument, which should be separated from it by white space. The colon and question mark characters may not be used as option char- acters. Each time it is invoked, getopts places the next option in the shell vari- able name, initializing name if it does not exist, and the index of the next argument to be processed into the variable OPTIND. OPTIND is initialized to 1 each time the shell or a shell script is invoked. When an option requires an argument, getopts places that argument into the variable OPTARG. The shell does not reset OPTIND auto- matically; it must be manually reset between multiple calls to getopts within the same shell invocation if a new set of parameters is to be used. When the end of options is encountered, getopts exits with a return value greater than zero. OPTIND is set to the index of the first non-option argument, and name is set to ?. getopts normally parses the positional parameters, but if more arguments are given in args, getopts parses those instead. getopts can report errors in two ways. If the first character of optstring is a colon, silent error reporting is used. In normal operation diagnostic messages are printed when invalid options or missing option arguments are encountered. If the variable OPTERR is set to 0, no error messages will be displayed, even if the first character of optstring is not a colon. If an invalid option is seen, getopts places ? into name and, if not silent, prints an error message and unsets OPTARG. If getopts is silent, the option character found is placed in OPTARG and no diagnostic message is printed. If a required argument is not found, and getopts is not silent, a question mark (?) is placed in name, OPTARG is unset, and a diagnostic message is printed. If getopts is silent, then a colon (:) is placed in name and OPTARG is set to the option charac- ter found. getopts returns true if an option, specified or unspecified, is found. It returns false if the end of options is encountered or an error occurs. hash [-lr] [-p filename] [-dt] [name] For each name, the full file name of the command is determined by searching the directories in $PATH and remembered. If the -p option is supplied, no path search is performed, and filename is used as the full file name of the command. The -r option causes the shell to forget all remembered locations. The -d option causes the shell to forget the remembered location of each name. If the -t option is supplied, the full pathname to which each name corresponds is printed. If multiple name arguments are supplied with -t, the name is printed before the hashed full pathname. The -l option causes output to be displayed in a format that may be reused as input. If no arguments are given, or if only -l is supplied, information about remembered commands is printed. The return status is true unless a name is not found or an invalid option is supplied. help [-s] [pattern] Display helpful information about builtin commands. If pattern is specified, help gives detailed help on all commands matching pattern; otherwise help for all the builtins and shell control structures is printed. The -s option restricts the infor- mation displayed to a short usage synopsis. The return status is 0 unless no command matches pattern. history [n] history -c history -d offset history -anrw [filename] history -p arg [arg ...] history -s arg [arg ...] With no options, display the command history list with line numbers. Lines listed with a * have been modified. An argument of n lists only the last n lines. If the shell variable HISTTIMEFORMAT is set and not null, it is used as a format string for strftime(3) to display the time stamp associated with each displayed history entry. No intervening blank is printed between the formatted time stamp and the history line. If filename is supplied, it is used as the name of the history file; if not, the value of HISTFILE is used. Options, if supplied, have the following meanings: -c Clear the history list by deleting all the entries. -d offset Delete the history entry at position offset. -a Append the ‘‘new’’ history lines (history lines entered since the beginning of the current bash session) to the history file. -n Read the history lines not already read from the history file into the current history list. These are lines appended to the history file since the begin- ning of the current bash session. -r Read the contents of the history file and use them as the current history. -w Write the current history to the history file, overwriting the history file’s contents. -p Perform history substitution on the following args and display the result on the standard output. Does not store the results in the history list. Each arg must be quoted to disable normal history expansion. -s Store the args in the history list as a single entry. The last command in the history list is removed before the args are added. If the HISTTIMEFORMAT is set, the time stamp information associated with each history entry is written to the history file. The return value is 0 unless an invalid option is encountered, an error occurs while reading or writing the history file, an invalid offset is supplied as an argument to -d, or the history expansion supplied as an argument to -p fails. jobs [-lnprs] [ jobspec ... ] jobs -x command [ args ... ] The first form lists the active jobs. The options have the following meanings: -l List process IDs in addition to the normal information. -p List only the process ID of the job’s process group leader. -n Display information only about jobs that have changed status since the user was last notified of their status. -r Restrict output to running jobs. -s Restrict output to stopped jobs. If jobspec is given, output is restricted to information about that job. The return status is 0 unless an invalid option is encountered or an invalid jobspec is sup- plied. If the -x option is supplied, jobs replaces any jobspec found in command or args with the corresponding process group ID, and executes command passing it args, returning its exit status. kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ... kill -l [sigspec | exit_status] Send the signal named by sigspec or signum to the processes named by pid or jobspec. sigspec is either a case-insensitive signal name such as SIGKILL (with or without the SIG prefix) or a signal number; signum is a signal number. If sigspec is not present, then SIGTERM is assumed. An argument of -l lists the signal names. If any arguments are supplied when -l is given, the names of the signals corresponding to the arguments are listed, and the return status is 0. The exit_status argument to -l is a number specifying either a signal number or the exit status of a process termi- nated by a signal. kill returns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered. let arg [arg ...] Each arg is an arithmetic expression to be evaluated (see ARITHMETIC EVALUATION). If the last arg evaluates to 0, let returns 1; 0 is returned otherwise. local [option] [name[=value] ...] For each argument, a local variable named name is created, and assigned value. The option can be any of the options accepted by declare. When local is used within a function, it causes the variable name to have a visible scope restricted to that function and its children. With no operands, local writes a list of local variables to the standard output. It is an error to use local when not within a function. The return status is 0 unless local is used outside a function, an invalid name is sup- plied, or name is a readonly variable. logout Exit a login shell. popd [-n] [+n] [-n] Removes entries from the directory stack. With no arguments, removes the top direc- tory from the stack, and performs a cd to the new top directory. Arguments, if sup- plied, have the following meanings: +n Removes the nth entry counting from the left of the list shown by dirs, start- ing with zero. For example: ‘‘popd +0’’ removes the first directory, ‘‘popd +1’’ the second. -n Removes the nth entry counting from the right of the list shown by dirs, starting with zero. For example: ‘‘popd -0’’ removes the last directory, ‘‘popd -1’’ the next to last. -n Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. If the popd command is successful, a dirs is performed as well, and the return status is 0. popd returns false if an invalid option is encountered, the directory stack is empty, a non-existent directory stack entry is specified, or the directory change fails. printf [-v var] format [arguments] Write the formatted arguments to the standard output under the control of the format. The format is a character string which contains three types of objects: plain charac- ters, which are simply copied to standard output, character escape sequences, which are converted and copied to the standard output, and format specifications, each of which causes printing of the next successive argument. In addition to the standard printf(1) formats, %b causes printf to expand backslash escape sequences in the cor- responding argument (except that \c terminates output, backslashes in \', \", and \? are not removed, and octal escapes beginning with \0 may contain up to four digits), and %q causes printf to output the corresponding argument in a format that can be reused as shell input. The -v option causes the output to be assigned to the variable var rather than being printed to the standard output. The format is reused as necessary to consume all of the arguments. If the format requires more arguments than are supplied, the extra format specifications behave as if a zero value or null string, as appropriate, had been supplied. The return value is zero on success, non-zero on failure. pushd [-n] [dir] pushd [-n] [+n] [-n] Adds a directory to the top of the directory stack, or rotates the stack, making the new top of the stack the current working directory. With no arguments, exchanges the top two directories and returns 0, unless the directory stack is empty. Arguments, if supplied, have the following meanings: +n Rotates the stack so that the nth directory (counting from the left of the list shown by dirs, starting with zero) is at the top. -n Rotates the stack so that the nth directory (counting from the right of the list shown by dirs, starting with zero) is at the top. -n Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. dir Adds dir to the directory stack at the top, making it the new current working directory. If the pushd command is successful, a dirs is performed as well. If the first form is used, pushd returns 0 unless the cd to dir fails. With the second form, pushd returns 0 unless the directory stack is empty, a non-existent directory stack element is specified, or the directory change to the specified new current directory fails. pwd [-LP] Print the absolute pathname of the current working directory. The pathname printed contains no symbolic links if the -P option is supplied or the -o physical option to the set builtin command is enabled. If the -L option is used, the pathname printed may contain symbolic links. The return status is 0 unless an error occurs while reading the name of the current directory or an invalid option is supplied. read [-ers] [-u fd] [-t timeout] [-a aname] [-p prompt] [-n nchars] [-d delim] [name ...] One line is read from the standard input, or from the file descriptor fd supplied as an argument to the -u option, and the first word is assigned to the first name, the second word to the second name, and so on, with leftover words and their intervening separators assigned to the last name. If there are fewer words read from the input stream than names, the remaining names are assigned empty values. The characters in IFS are used to split the line into words. The backslash character (\) may be used to remove any special meaning for the next character read and for line continuation. Options, if supplied, have the following meanings: -a aname The words are assigned to sequential indices of the array variable aname, starting at 0. aname is unset before any new values are assigned. Other name arguments are ignored. -d delim The first character of delim is used to terminate the input line, rather than newline. -e If the standard input is coming from a terminal, readline (see READLINE above) is used to obtain the line. -n nchars read returns after reading nchars characters rather than waiting for a com- plete line of input. -p prompt Display prompt on standard error, without a trailing newline, before attempt- ing to read any input. The prompt is displayed only if input is coming from a terminal. -r Backslash does not act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair may not be used as a line continuation. -s Silent mode. If input is coming from a terminal, characters are not echoed. -t timeout Cause read to time out and return failure if a complete line of input is not read within timeout seconds. This option has no effect if read is not reading input from the terminal or a pipe. -u fd Read input from file descriptor fd. If no names are supplied, the line read is assigned to the variable REPLY. The return code is zero, unless end-of-file is encountered, read times out, or an invalid file descriptor is supplied as the argument to -u. readonly [-apf] [name[=word] ...] The given names are marked readonly; the values of these names may not be changed by subsequent assignment. If the -f option is supplied, the functions corresponding to the names are so marked. The -a option restricts the variables to arrays. If no name arguments are given, or if the -p option is supplied, a list of all readonly names is printed. The -p option causes output to be displayed in a format that may be reused as input. If a variable name is followed by =word, the value of the vari- able is set to word. The return status is 0 unless an invalid option is encountered, one of the names is not a valid shell variable name, or -f is supplied with a name that is not a function. return [n] Causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command executed in the function body. If used outside a function, but during execution of a script by the . (source) command, it causes the shell to stop executing that script and return either n or the exit status of the last command executed within the script as the exit status of the script. If used outside a function and not during execution of a script by ., the return status is false. Any command associated with the RETURN trap is executed before execution resumes after the function or script. set [--abefhkmnptuvxBCHP] [-o option] [arg ...] Without options, the name and value of each shell variable are displayed in a format that can be reused as input for setting or resetting the currently-set variables. Read-only variables cannot be reset. In posix mode, only shell variables are listed. The output is sorted according to the current locale. When options are specified, they set or unset shell attributes. Any arguments remaining after the options are processed are treated as values for the positional parameters and are assigned, in order, to $1, $2, ... $n. Options, if specified, have the following meanings: -a Automatically mark variables and functions which are modified or created for export to the environment of subsequent commands. -b Report the status of terminated background jobs immediately, rather than before the next primary prompt. This is effective only when job control is enabled. -e Exit immediately if a simple command (see SHELL GRAMMAR above) exits with a non-zero status. The shell does not exit if the command that fails is part of the command list immediately following a while or until keyword, part of the test in an if statement, part of a && or ││ list, or if the command’s return value is being inverted via !. A trap on ERR, if set, is executed before the shell exits. -f Disable pathname expansion. -h Remember the location of commands as they are looked up for execution. This is enabled by default. -k All arguments in the form of assignment statements are placed in the environ- ment for a command, not just those that precede the command name. -m Monitor mode. Job control is enabled. This option is on by default for interactive shells on systems that support it (see JOB CONTROL above). Back- ground processes run in a separate process group and a line containing their exit status is printed upon their completion. -n Read commands but do not execute them. This may be used to check a shell script for syntax errors. This is ignored by interactive shells. -o option-name The option-name can be one of the following: allexport Same as -a. braceexpand Same as -B. emacs Use an emacs-style command line editing interface. This is enabled by default when the shell is interactive, unless the shell is started with the --noediting option. errtrace Same as -E. functrace Same as -T. errexit Same as -e. hashall Same as -h. histexpand Same as -H. history Enable command history, as described above under HISTORY. This option is on by default in interactive shells. ignoreeof The effect is as if the shell command ‘‘IGNOREEOF=10’’ had been exe- cuted (see Shell Variables above). keyword Same as -k. monitor Same as -m. noclobber Same as -C. noexec Same as -n. noglob Same as -f. nolog Currently ignored. notify Same as -b. nounset Same as -u. onecmd Same as -t. physical Same as -P. pipefail If set, the return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status, or zero if all command
在基于Windows 2000网络中,活动目录(Active Directory)是它的核心。活动目录是一个分布式的目录服务。网络信息可以分散在多台不同的计算机上,保证快速访问和容错;同时不管用户从何处访问或信息处在何处,对用户都提供统一的视图。可以这样说:没有活动目录,就没有Windows 2000。7 E9 e* I* K; J 8 F# j3 ^7 j$ j一、活动目录基础 6 z) K" V O6 _, k$ m$ F0 D(一)活动目录概览( X# G1 c6 B+ z* g$ f9 w! ]& I 1.什么是活动目录" D1 N0 ~3 _ J$ B0 p 8 m s, [* {) i) n6 f4 s 活动目录是Windows 2000网络中的目录服务。目录服务是一种网络服务,它存储关于网络资源的信息,并使用户或应用程序可以访问这些资源。活动目录使用同样的方法命名、描述、查找、访问、管理和保护这些资源的信息。/ h( T2 t7 ~5 X0 ^4 p - u- i! w* d# O4 d' Y* E( v(1)活动目录的功能: 6 Y4 }' M# y) {5 K. V3 m! R7 S; v 活动目录提供的服务功能,包括一种集中组织、管理和控制网络资源访问的方法。它使物理网络拓朴和协议透明化,这样网络上的用户可以访问任何资源,而不需要知道资源在什么地方,或物理上它是如何连接到网络上的。% t! G+ S" E# e9 q 2 \% m) N4 I- I* v4 f. t(2)集中式管理: * [. Y& e' Q6 @, z7 u& O$ X4 V0 m1 |4 n) K! a% Y 一个运行Windows 2000的服务器在活动目录中存储系统配置、用户简介和应用程序的信息。与组策略相结合,活动目录可以使管理者使用同样的管理界面管理分布式桌面、网络服务和来自中心位置的应用程序。活动目录同时提供对网络资源集中控制,允许用户只登录一次就可以访问整个活动目录的资源。/ [) F0 b& {- Z' Y : Q8 }* B' c% \$ Z# w0 q- x- @ 2.活动目录对象% i& Q! Q* t' M4 {7 }' n- K$ y * Z2 j) M0 E4 [) U* P, j. {活动目录存储网络对象的信息。活动目录对象代表网络资源。如用户、组、计算机和打印机。而且,网络中所有的服务器、域和站点都作为对象。因为活动目录代表了所有网络资源,只需要一个管理员就可以管理这些资源。+ e7 X" A; h1 H+ ?2 z8 p ) ~( _. I6 _% C( D' ?+ z3.轻型目录访问协议 + Y; _% K9 n+ K/ F i6 G/ _: x4 y# X% d 轻型目录访问协议(Lightweight Directory Access Protocol,LDAP)是用于访问活动目录的协议。2 ?: L1 z$ `1 l1 g$ G r6 S 2 G/ r( M+ |) R) R" j" ^* [. [LDAP是用于查询和更新活动目录的目录服务协议。LDAP协议规范表明,一个活动目录对象可以由一系列域组件、OU和普通名字来代表,它们组成了活动目录中的命名路径。LDAP命名的路径是用来访问活动目录对象的,它包括了下面的两类:% T* B4 E: k( {8 ^ 9 U& n1 d0 J; Q: q, w1 O. t+ k1 z (1)标识名(Distinguished Name): ; n! e# H# Q; X' J 7 k& D: |( n5 V! b+ v+ T d/ R在活动目录中每个对象都有一个标识名,标识名确定了对象所在的域和可以找到对象的完整路径。比如,典型的标识名包括: ) v( ^# h2 Q% P ) k( @' h3 e4 k* G+ s" i7 `CN=TOM,OU=Manager,DC=Tech,DC=COM$ s" t. g: e" ^6 q) _ . W, `* `$ G+ l& }7 O/ ^$ Z) G" R(^60090102a^) , ]4 n* g, \5 M2 B7 ?% y( N5 T& w7 s8 Y4 C (2)相对标识名(Relative Distinguished Name):$ Q4 y( i A" B! J2 f, } ) Q' A. Z% l8 F5 K LDAP相对标识名是LDAP标识名的一部分,它用来标识容器中的对象,它的组成随客户建立的现场搜索内容的大小而变化。搜索内容的范围可以是域组件,也可以是普通名字的对象。 1 N6 f7 Q+ p: _0 L: e0 n2 n5 o7 g1 y 下表中给出了标识名,客户建立的搜索内容和相对标识名的具体的例子。 ( `/ b$ c$ Q: f5 G1 h5 j6 t4 x' X! J& K/ L (^60090102b^) - o; a/ R( W" Q( H+ w7 W' e$ n# [' z7 S (二)活动目录结构 / R1 e, {5 F6 l7 `2 g1.活动目录的逻辑结构 ; {! I/ m% N1 x; b! v: i : g: W2 s% o% A6 {4 x0 B(1)域: ' }' }5 v" y7 @9 K! G _5 Q- _+ f( P0 ] 域(Doamin)是活动目录中逻辑结构的核心单元,一个域包含许多台计算机,它们由管理员设定,共用一个目录数据库。一个域有一个唯一的名字,给那些由域管理员集中管理的用户账号和组账号提供访问通道。 " t9 D5 }8 f9 S0 v/ d8 o- M V1 D2 k2 ~+ N6 [2 v7 C. _ 要创建域,用户必须将一个或更多的运行Windows 2000 Server的计算机升级为域控制器。每个域至少必须包含一个域控制器。$ p8 r1 I2 U0 K0 _3 s, @4 ~1 S ( d; ]% ]2 v0 V. k1 P0 ?# C(2)组织单元:" f, N4 i; A9 D1 h+ _ 1 p* g8 H, B, x$ p, h5 p& o 组织单元(Organizational Units,OU)是一个起组织作用的单位。它可将用户、组、计算机和其他单位放入其中的活动目录容器。组织单元不能包括来自其他域的对象。组织单元是可以指派组策略设置或委派管理权限的最小作用域或单位。使用组织单元,用户可在组织单元中代表逻辑层次结构的域中创建容器。这样用户就可以根据用户的组织模型管理账户和资源的配置和使用。 1 e+ }# `! n6 {& h9 ~6 T) \* O0 q 8 V0 D0 S) [( v5 \$ [% R(3)目录树和目录林:4 t+ Q+ o8 q7 X: }% K 0 K+ g; |# ^; h3 S% y1 B 活动目录中的每个域利用DNS(Domain Name Server,域名服务)域名加以标识,并且需要一个或多个域控制器。如果用户的网络需要一个以上的域,则用户可以创建多个域。共享相同的公用架构和全局目录的一个或多个域称为域林。如果树林中的多个域有连续的DNS域名,则该结构称为域树。如^60090102c^所示。 ' C, [0 _7 o0 Q0 w, S" v+ z( D* t7 N 如果相关域树共享相同的活动架构以及目录配置和复制信息,但不共享连续的DNS名称空间,则称之为域林。$ h, Z8 p5 k( h# f0 W - v# E$ N5 i/ @域树和域林的组合为用户提供了灵活的域命名选项。连续和非连续的DNS名称空间都可加入到用户的目录中。 $ b2 D1 h Z5 S& O# P/ A- n; [7 S 2 O" c5 Z' v+ z3 W# r5 `/ X. d(4)全局目录:. C- m/ F* a4 T5 e ' r! o0 C5 N1 @$ j/ Q% H0 V7 w$ r一个域的活动目录类似于一本书的目录,那么全局目录就好像是一系列书的总目录。在全局目录中包含一个已有活动目录对象属性的子集。默认情况下,存储在全局目录中的对象属性是那些经常用到的内容,而非全部属性。 - g' B e* Q1 b' N! @ 4 k9 H# a7 L4 C" C全局目录服务器是一个域控制器,活动目录建立的第一个域控制器自动成为全局目录服务器。全局目录就放在全局目录服务器上。 5 E4 E: a& _- c% ~1 X 4 Z z8 n. F8 D8 @1 `% A/ p% x4 s2.活动目录的物理结构& i* E3 v! U0 s+ ]5 ? , D* g0 V# `" `) g(1)域控制器: _1 {% O: y' ]+ W/ [ 8 c6 p0 N( J1 o域控制器就是存储活动目录的地方,一个域可以有一个或几个域控制器。在域中,各域控制器相互复制活动目录的改变,在目录林中,各域控制器相互之间也把信息自动复制给对方。 $ j D* X9 F, S$ @ X1 Q+ i. m2 x' M % H; [# e9 \& q- B# f. `(2)站点:+ G! K. R5 I* ~: k6 g1 B$ @4 Z- j' B ( y: ] o$ r9 C( \/ x5 b @: a站点(Site)是由一个或多个IP子网中的一组计算机,确保目录信息的有效交换,站点中的计算机需要很好地连接,尤其是子网内的计算机。站点和域名称空间之间没有必要的连接。站点反映网络的物理结构,而域通常反映用户单位的逻辑结构。逻辑结构和物理结构相互独立,所以网络的物理结构及其域结构之间没有必要的相关性,活动目录允许单个站点中有多个域,单个域中有多个站点。 2 p h5 x$ E8 O, \0 s( d" q+ l; n. t6 E0 z4 F/ R1 ?$ F 如果配置方案未组织成站点,则域和客户之间的信息交换可能非常混乱。站点能提高网络使用的效率。 ; K( `+ F8 I2 b4 t 7 q6 g1 \( i9 c1 B( S9 X( G二、安装活动目录* O! ~# |* Y1 x4 ]: E; X$ _4 ?. } (一)安装活动目录的要点 3 t; E1 N, f& V* e4 p3 S首先,也是最重要的一点,就是你必须有安装活动目录的管理员权限,否则无法安装。' E/ P8 R' x% B$ f( q7 h5 i 3 ^7 w8 h% q+ a) v" n$ D0 K; C在安装活动目录之前,要确保计算机满足基本系统要求:* Z& t: _9 N6 A1 c" C - B7 H( D6 e+ q- W9 x(1)计算机运行Windows 2000 Server版本,且系统盘是NTFS分区。0 O0 F/ N" {4 M2 A* V6 X$ g; f/ Z9 g & t' m4 Y7 \: g+ c* T3 A (2)用于活动目录数据库的最小磁盘空间为200MB,另外还要有50MB的空间用于活动目录数据库的日志文件。% N, l3 [) D1 u9 r- R" {: `( U6 K - S P; `* |# m( E* Q$ E& U2 u (3)已做好了DNS服务器的解析。1 C. \( h3 k) `6 q2 A1 @! P " v" N0 w: a& ~: e- I DNS(Domain Name Server, 域名服务器)是活动目录的基础,没有DNS就不会有活动目录。DNS也叫域名服务,它的作用是将某个域名与IP地址对应,从而将人易于理解的域名转达化为易于计算机寻址的IP地址。而如果活动目录中的资源对应的是LDAP标识,那么只需要DNS中有这个标识的定位记录就可以很方便地供用户查找资源,并寻址到相应的位置上。' u* [+ L2 m- \ j: h: L. r7 u 有关DNS服务器的配置,读者可以参考《电脑报2001年合订本》下册附录中《ⅡS 5.0网络建站完全手册》一文。 4 ^; U6 a4 c4 _+ F. @& i* y2 M 9 X, c" R4 J. `7 w: z(二)安装活动目录 3 |" ]' a: f6 V# D$ W运行活动目录安装向导将Windows 2000 Server升级为域控制器以创建一个新域,或者向现有的域添加其他域控制器。2 E5 K. u' s+ W: ?7 g7 L # u) H2 p, | f 1.安装域里的第一台域控制器 4 w9 {' z: n+ Q: ]3 Y 0 `) M, t8 y9 `- K在安装活动目录前首先确定DNS服务正常工作,下面我们来安装根域为lanyi.com的第一台域控制器。! l. {% A- D& a# l : A5 u: R, v0 f5 \' Z9 o m(1)运行位于C:\Winnt\System32目录下的dcpromo.exe文件,以启动活动目录安装向导。点击“下一步”按钮。 4 a/ ~1 x* @2 z7 m5 G6 m3 y; D! M0 t! t. R (2)由于用户所建立的是域中的第一台域控制器,所以在“域控制器类型”对话框中选择“新域的域控制器”选项,然后点击“下一步”按钮。 , ^: j- [0 {3 Z& m2 B1 l9 Z) p5 p! _; \+ c (3)在“创建目录树和子域”对话框中选择“创建一个新域的域目录树”,点击“下一步”按钮。; ]1 h& I- K! @3 h/ J5 g 3 A. q3 r6 `' g+ S(4)在“创建或加入目录林”对话框中选择“创建新的域目录林”,点击“下一步”按钮。 # [2 D" E4 o; N. j, d- g; H! U! k" ~. |+ m (5)在“新的域名”对话框中的“新域的DNS全名”框中输入需要创建的域名,这里是lanyi.com。点击“下一步”按钮。& M: O; I8 X% Z3 k0 K+ m8 G0 g9 { 2 G/ b7 t( E" {9 y8 G2 S" _. l(6)在“NetBIOS域名”对话框中,安装向导自动将域控制器的NetBIOS名设置为“LANYI”,点击“下一步”按钮。9 P* U& U; P' P; [! D* E) ? + S& e$ Y$ N# _' q(7)在“数据库和日志文件位置”对话框中,将显示数据库、日志文件的保存位置,一般不必作修改。点击“下一步”按钮。, @! c5 p) @* R' C" d! h ( V" p$ a2 X4 G t7 k; L6 Z! ?) V (8)在“共享的系统卷”中,指定作为系统卷共享的文件夹。Sysvol文件夹存放域的公用文件的服务器副本。Sysvol广播的内容被复制到域中的所有域控制器。其文件夹位置一般不必作修改。点击“下一步”按钮。* t% T! ?5 X- E- U) b N5 o: I4 c) ^) U0 O(9)在“配置DNS”对话框中,点击“下一步”按钮(如果在安装活动目录之前未配置DNS服务器,可以在此让安装向导配置DNS,推荐使用这种方法)。 7 j6 ^* x& Z4 D* U. p$ g : ^4 V; D- D1 }0 ?5 T(10)在“权限”对话框中为用户和组选择默认权限,考虑到现在大多数单位中仍然需要使用Windows 2000的以前版本,所以选择“与Windows 2000服务器之前版本相兼容的权限”选项,点击“下一步”按钮。 ; u. j1 k. B `+ Z; w+ a, |1 {9 x) U" y1 [5 l/ U+ M% A9 u0 t1 N; V (11)在“目录服务恢复模式的管理员密码”对话框中输入以目录恢复模式下的管理员密码。点击“下一步”按钮。 / i: @, K$ g# u. |# d ' n% K7 [9 X: @3 ^(12)此时,安装向导将显示安装摘要信息。点击“下一步”按钮即可开始安装,安装完成之后,重新启动计算机即可。 9 X2 l( n" a% K, ~/ r. }+ x* z5 n8 u% ?8 e" a 2.检验安装结果* S0 C) w1 I$ \; ^' ?* W+ z- H : Y: s& ?. U3 s# X& P7 N& f 安装完成后,可以通过以下方法检验活动目录安装是否正确,在安装过程中一项最重要的工作是在DNS数据库中添加服务记录(即SRV记录)。; G F! |; z( Z3 n& }- d: ? % e* |8 R( Z% e+ s9 N! X# X (1)检查DNS文件的SRV记录:用文本编辑器打开%systemroot%\system32\config\中的Netlogon.dns文件,查看LDAP服务记录,在本例中为_ldap._tcp.lanyi.com.600 IN SRV 0 100 389 n2k_server.lanyi.com. ! f9 |9 r l& ?6 { & {) K* E8 T$ j0 R/ S, T(2)验证SRV记录在NSLOOKUP命令工具中运行正常:在命令提示行下,输入“nslookup”命令;输入“set type=srv”命令;然后输入_ldap._tcp.lanyi.com。此时如果返回了服务器名和IP地址,说明SRV记录工作正常。! o9 K; o8 q' _( ]" C/ ~% ^ & Q: Q: d0 j8 C 另外,当安装完毕后,在管理工具中提供了三个工具:Active Directory用户和计算机、Active Directory域和信任关系、Active Directory站点和服务。同时系统还提供了Active DirectorySchema和ADSI,主要用于Active Direttory开发的工具。: T5 J9 f/ E# Y! h& @ 6 W* V, Z6 w( E+ l% q0 d0 @Active Directory用户和计算机工具是配置互动目录最常用的工具,在后面我们将详细介绍它的使用方法。1 g1 F, _* x7 u1 r/ g - M* U6 n% G! G. S6 Y6 u 3.删除活动目录- h8 h, m3 j3 R 1 I$ |: u& {4 p2 t9 R( d 与安装活动目录一样,运行dcpromo.exe文件即可。 # z0 Q5 R: y5 G8 v: Z, T- D3 U& R- B/ q3 t 三、设置管理用户和组 0 L6 n8 Y" v2 L: D( e! p在网络中为用户开设账户的工作即是一项基本功能,又是一项非常重要的工作,因为账户与权限有关。% \0 v- A+ ^# k Q' l( `+ n* } S3 Q' X% s: F9 q用户账号保存在活动目录中,为该用户账号启动唯一登录的对象。唯一登录是指从工作站登录获得网络资源的访问过程中,用户只能输入一次名字和密码。域用户账号可以登录到域访问网络资源,或是登录到个人计算机上访问本机上的资源。 ( ?0 I4 }. [. |9 G( m0 P% z! b O/ O- f/ H% S (一)用户登录名 & @2 Z6 [; S2 `+ N1.用户主名2 N. Z0 Y& W. Y: t& l" L : L) ?! [! {& t 在活动目录中,每个用户都有一个用户登录名,和一个pre-Windows 2000用户登录名。用户账户信息用来验证和认可目录林中任何地方的用户,这就导致了唯一登录。( U& g/ t$ ?% z% k; S2 l 3 b/ g1 x" j6 h. I5 P) n 用户主名是只用于登录Windows 2000网络上的登录名。也可将此名看作是用户登录名。一个用户主名有两个部分,它们用@符号隔开。如apple@lanyi.com。一个用户登录名有以下两个组成部分: ' L: V$ y2 ~* p3 a6 K, X 6 T6 D6 P' H& ~# `用户主名前缀:在apple@lanyi.com是apple。 0 u) c2 E/ S( |. Z; o5 y( L9 |: \9 Q" j& D. b% d 用户主名后缀:在apple@lanyi.com是lanyi.com。默认情况下,后缀是网络中根域的名字。用户可以使用网络中的其他域来为用户配置其他的后缀。( t6 A8 k+ D& S0 D3 `8 V( { 0 k( `$ Y; e7 I' d 2.创建用户主名后缀* m& H& Y6 p/ X% f. E 0 ^ y! P+ P# }1 u) |% q0 u (1)点击“开始→程序→管理工具→Active Directory域和信任关系”选项,右击“Active Directory域和信任关系”选项,选择“属性”命令。; E( e# [* m2 j9 U" ~6 v" Q 7 B0 n* e$ H7 e(2)在打开的对话框的“UPN后缀”选项卡中输入一个可供选择的后缀名,如lanyi.com,然后点击“添加”按钮。 3 h% A* [7 t' R, S/ w 4 q7 Q) m; L2 M8 z; J(二)管理用户账号 " h9 V5 h& W5 j1.创建一个用户账号 ! u7 L6 X$ o" Q! v . c; O" M7 `; k8 ? `1 Y(1)点击“开始→程序→管理工具→Active Directory用户和计算机”选项,在打开的窗口的左侧栏中右击“user”容器,选择“新建对象”命令。 3 f, W' g6 i7 c: {' b) e G; Z 1 O( A) J- d2 a* D(2)在打开的“新建对象”对话框中,输入姓名和用户登录名。点击“下一步”按钮,输入用户密码。其中:4 \9 R1 x1 R5 @8 Y$ Z1 ~. V: ?5 s+ k4 j / T! K9 J+ B+ q, ~$ h用户下次登录时需要更改密码:如选中此项,用户下次登录时将提示用户重新输入新密码。 ; Q; M) E$ S4 y0 F: N! C E# Q( U. _1 `用户不能更改密码:这一选项保证用户密码不能被修改。 ' m* c& e' A' c* c( T$ F : p: d2 C$ }% a密码永不过期:如选中此项,密码将永不过期。因为过期的密码将不能使用,过期时间在账户安全策略中设置,或在账户属性对话框中修改。. `" F5 P2 W6 S: Z: S: t + |* h9 m5 G% K+ u6 | q 账户已停用:表明此账户已被停止使用,如想让账户解锁,必须由管理员在用户属性对话框中设置。- A1 D( b% H' Q! [# [9 {6 j. u . Q6 W) |: D+ V: `2.执行公共管理任务 4 K f9 h# w# \3 \: ~, y7 o3 T" C5 M9 M (1)禁用和启用用户账号: 2 m" s' |% M v2 I+ |1 ` : O+ x' s( u2 x% n J当用户一段时间内不需要他们的账号,但一段时间后需要使用它们时,管理员可将此用户账号禁用。 $ U+ ?9 B; o. H- a3 T ! e( R% O7 ?4 e0 F9 U在“Active Directory用户和计算机”窗口中,右击相应的用户账号,然后根据该账号的当前状态点击“停用账户”或“启用账户”命令即可。 ! e" R' K/ b! e4 Q3 U& C0 w. k* h& ` / R" x) y( Y; G(2)重设密码: / Z3 t& P! }3 V; j* m: }; e2 x9 p# b 0 `. ?4 X. p- a: f当在用户改变密码前密码期满或是用户忘记密码的情况下,管理员需要重新设置密码。 8 S& B+ s- b' }( q) i* u+ r. m5 h7 R0 a! m" l9 | 在“Active Directory用户和计算机”窗口中,右击相应的用户账号,然后点击“重设密码”命令即可。 # Q, H) ^& x; w3 I! L' w5 L- [9 w: p! u3 z (3)在一个域内移动用户账号: 7 d/ F3 v- e9 D. p + x5 t: O$ d! U3 g% B1 l必要时,管理员可能需要在同一个域内的OU之间移动用户账号。例如一个职员从一个部门调到另一个部门,这样将由另一个管理员管理该职员的用户账号。8 o( q0 V0 B) ?1 Z/ P$ I9 \ 4 z) [! H9 N* W5 k8 [& [% B* \在“Active Directory用户和计算机”窗口中,右击相应的用户账号,点击“移动”命令。在打开的“移动”对话框中,双击域目录树,点击对象要移入的OU,然后点击“确定”按钮即可。 ' v: [: s8 A( w* c7 t6 D* K- c5 G* K/ k + Q% u; V. T) D- C(4)删除用户账号: ) c( ]( I- \6 R$ E" |5 J3 A9 @7 |( K w, x 在活动目录中存在有无用的账号,如果一个授权用户能够使用一个无用的账号登录可能会引起网络安全的风险,所以对无用的账号应当删除。6 m' e$ F3 p: H / G9 ]) J, d9 S在“Active Directory用户和计算机”窗口中,右击相应的用户账号,然后点击“删除”命令即可。; X" b& R. l* ^" u6 C & L* z8 |8 Z& w0 K. L. ?1 k (5)重命名用户账号:* h& U+ a: o+ u8 W! G5 X7 S0 D' L # `' C* @2 M$ n4 ?$ x: n: n如果管理员想保留以前某个账户所指定的各种属性和权限给一个新的用户时,可以将以前的账户重命名。, _# {' X6 K2 g1 f6 ~ c" \/ b2 x % u( B' @7 S! j 在“Active Directory用户和计算机”窗口中,右击相应的用户账号,然后点击“重命名”命令即可。 - X% f2 j5 D4 E. V: \6 j* i* q* D8 \3 Z% z 3.为域用户账号设置属性 8 }6 @" E& N6 i6 t+ \4 W8 y& O% \+ ~9 g4 X/ x( b. C) y (1)设置个人属性:* K$ G3 ?$ X3 E+ Y $ s8 n) l; @# W 在“Active Directory用户和计算机”窗口中,右击相应的用户账号,点击“属性”命令即可打开相应的属性对话框。在该对话框中,各个选项卡对应于不同的用户设置,你可以根据具体的情况尽可能的详尽填写。这样做的好处是利于以后的账户查找。) B2 M8 V Z e0 H, ^" u % ^" \3 ^2 @ V' P" ~ f (2)设置账户属性: 9 M7 V/ V+ }/ j6 [" y! b + Q, B! A1 M2 C: S6 {4 y* A在“账户”选项卡中管理员可以指定用户的登录名称,设置账户选项,指定账号失效日期。5 [* {* q' z3 q+ W% I 7 r7 T; X7 m$ o你可以在该选项卡下配置当你创建该账户时指定的设置值,如用户登录名和登录选项。可以修改密码需求条件,为此,在“账户选项”选项组下选择相应的复选框即可。2 _$ n% Z$ }# \8 P0 i& U9 g 3 ^. r C3 {& Y$ x除此之外,还可以在该选项卡下设置用户账户的失效日期。到达这一日期后,Windows 2000将自动禁用相应的账户。默认情况下,用户账号永不失效。为此,你只需要在“账户过期”选项组中,点击“在这之后”选项,然后从列表中选择一个失效日期,点击“确定”按钮。 2 j3 |( X! h+ L4 j) f$ s' V 0 M7 _/ M$ w- ?1 Z(3)指定登录选项:7 f4 ^' h9 O, w2 B+ @1 D, H 2 [6 N' L- \- J; D _ 你可以通过设置用户的登录时段,控制用户可以在哪些时段登录到指定的域,你也可以通过设置登录工作站,来控制用户可以从哪个计算机登录到指定的域。 ) L1 S$ F6 B1 x7 K 0 ^! I0 @2 V0 B. G- b在默认情况下,用户可以每周七天,每天24小时连接到服务器。在高安全性网络中,你可能想限制用户可以登录到网络的时段。为了设置登录的时段,你可以按照下面的步骤进行:" j5 V& [0 t% j3 y3 a8 S : [6 b5 Z( ^/ C' j 在“账户”选项卡中点击“登录时间”按钮,打开相应的对话框。其中蓝色指示该用户可以登录到的时段,而白色框指示该用户不能登录到的时段。 ( i/ | Y, e+ q( B5 \4 [- n$ D% ? 在“天”和“时”框中,选择你想拒绝访问的时段框,并点击开始时间,然后向终止时间拖动,再点击“拒绝登录”或“允许登录”选项即可。5 F8 V c7 e; B ' `' y6 K5 z/ E% `$ x, w1 \ M同样的,你也可以指定用户从哪个计算机登录,在默认情况下,具有合法账号的任何用户都可以在运行Windows 2000的任何计算机登录到网络。 / j/ A& v2 x& W! y! K! c 9 u! x4 Z% ^- n+ C在“账户”选项卡中点击“登录到”按钮,然后在打开的对话框中点击“下列计算机”选项,添加用户可以进行登录的计算机。为此,在“计算机名称”框中输入计算机的名称,点击“添加”按钮即可。' k2 l. Q8 l8 c3 L& `; D/ Q 9 l% x& d1 ^* p: T' F+ m2 U2 s 4.用户配置文件/ F, F+ s4 A. r( e( w / r+ e+ r7 _1 C% q% u, f* q% r. O在Windows 2000中,用户的工作环境主要由用户配置文件定义的。为了安全性的目的,Windows 2000要求每一个访问系统的用户账号都有一个用户配置文件。用户配置文件包含所有必要的设置值,这些设置值包括显示器、区域设置、鼠标和声音设置等,除此之外还包括网络和打印机连接。- O# o0 t3 ?. k# j3 F2 S( V " e- ]; ~% b4 P) ]+ X f (1)用户配置文件的类型: ; f r- L: Y& L" w! s4 y8 Q 0 J- C: u' U) ?4 R" o/ U用户配置文件在用户第一次登录到计算机时创建。所有针对具体用户的设置值都自动保存在该用户的文件夹中,即C:\Documents and Settings\用户名。 , f: [ {, X9 p0 g ) ? z+ Z' P, w! E默认的用户配置文件:用作所有用户配置文件的基础。每个用户配置文件都开始于默认的用户配置文件的一个复制件。8 H& Q) X, R5 q7 Y . M+ F Y) @& A1 w$ C本地用户配置文件:在用户第一次登录到计算机时创建,并被存储在本地计算机中。每个计算机上可以有多个这样的配置文件。+ P1 R; O7 i4 q6 B N 9 N5 u7 U; L2 ]9 J$ q漫游用户配置文件:由系统管理员创建,并存储在某个服务器上。在任何时候,用户登录到网络中的任何计算机时,这一配置文件都是可用的。如果某个用户修改了他的桌面设置值,在该用户撤销登录时,这一用户配置文件即在服务器上更新。6 U y* J5 O# x ) ~3 D/ b3 \' {% Q3 [" k7 _9 O强制性用户配置文件:由管理员创建,用于为某个或某些用户指定特定的设置值。强制性用户配置文件可以是本地的或是漫游的用户配置文件。它不保存对用户桌面设置值的任何修改,用户可以修改他所登录的计算机的桌面设置值,但是当他们退出登录时,这些修改不被保存。 0 K* N" Q+ g$ k2 `9 @1 v3 b$ t! K% o1 t3 _; _7 X4 `, z" X (2)创建漫游的和强制性漫游的用户配置文件: 4 P) |" z& g) ^8 R$ o ; Z5 L1 a7 \$ i+ ~) J5 J让我们来创建漫游的用户配置文件:9 u) h) l1 s8 q i$ ^ H 5 j( @; W T) J7 y7 P8 X! c4 [6 n在某个服务器上创建一个共享的文件夹,并为用户提供对于该文件夹的“完全控制”的权限。$ L6 z! R2 B7 t 0 d3 K. M' [( j' q在用户账号属性对话框中,点击“配置文件”选项卡,在“配置文件路径”框中输入相应的路径信息,用以指定共享文件夹。键入的路径信息应该是\\server_name\shared_folder_name\user_name。可以采用变量%user_name%,而不键入具体的用户名称,此时,Windows 2000将自动用漫游用户配置文件的用户账号名称替代%user_name%。/ C, s% K _& |; ~, G3 P 6 z4 G* |1 i b: z 下面再让我们来创建一个强制性的漫游用户配置文件:8 u5 c& K+ W0 M4 @' {( h6 } - j0 S: R9 W F- l首先在某个服务器上创建一个共享文件夹,其中包含一个配置文件夹,创建的用户配置文件将被置于该文件夹中。为用户提供对于这一配置文件夹的“完全控制”权限。例如创建一个名称为“Profiles”文件夹,然后在该文件夹中创建一个名为“User1”的文件夹。 # k2 o" h( \. v3 ?7 c3 s5 K1 R 6 }1 Q. q0 |2 h建立一个已经配置的漫游用户配置文件。在“Active Directory用户和计算机”窗口中创建一个新的用户,指定该用户的配置文件夹作为路径信息,然后配置该配置文件。如创建一个名称为User1的用户,并指定配置文件的路径为\\server_name\Profiles\user1。为了配置该配置文件,以User1作为用户名称登录到域,必要的时候修改桌面设置值,然后退出登录。 0 \* A6 M O3 s5 d! E8 n# @' K) I3 q: `: f. Y+ @% W/ x 将配置文件Ntuser.dat重命名为Ntuser.man。这样做将使配置文件成为只读的,并因此而成为强制性的。& W3 p" Q5 k! z& V- L d/ s* I 5 F9 v3 C7 s/ B+ V (三)活动目录中的组& P* [9 k* Q3 X 组是可包含用户、联系人、计算机和其他组的Active Directory或本机对象。使用组可以简化管理。' Q, F. G2 b" L6 c6 g0 S ) P$ _/ W T8 n) a, c; Q& r1.从组的类型分类# P% ? K# B7 S: P! G0 K- I1 E& i 1 V, O9 H& U" d& Q( m(1)安全组:用于将用户、计算机和其他组收集到可管理的单位中。为资源(文件共享、打印机等)指派权限时,管理员应将那些权限指派给安全组而非个别用户。权限可一次分配给这个组,而不是多次分配给单独的用户。 . e/ c9 f) G* d& E7 L# d ( N" o. l6 D, ~) b1 S8 k+ O(2)分布组:只能用作电子邮件的组。不能用于筛选组策略设置。该组无安全功能。 - N3 ^8 H! |; B0 C+ E* }4 d; m6 A+ R1 G; r 上述两种组都支持域本地、全局或通用组范围中的一种。1 ?3 m* I9 q7 ^: p2 @5 i0 G & F) l" I3 {0 ~3 Z; ?7 t 2.域模式5 _5 S' V5 q" A3 [6 n+ x0 I $ L3 U1 v4 a; n% y2 g& l) T在学习本地、全局或通用组之前,我们需要先讲述一下域的模式。域模式共有两种,混合模式和本机模式。计算机刚升级为Windows 2000域控制器时,默认情况下为混合模式,如果你想更改为本机模式,可以按照下面的步骤进行:( J1 F1 I% X ^ i9 T3 Y& p ( E* d1 C4 q8 {# E# I在“Active Directory用户和计算机”窗口中,右击域名,选择“属性”命令。此时,你可以在打开的对话框的“常规”选项卡“域模式”选项组中,点击“更改模式”按钮,在打开的对话框中点击“是”按钮,即可将域模式改为本机模式。 + l' e9 H. R; k, G0 i 6 X9 @4 `+ E& I$ T7 p3.全局组2 h- g( M9 X' q2 g5 ^4 e+ V ( w- }, ~2 D U 利用这一组作用域,来组织那此具有类似的网络访问需求的用户。你可以利用全局组授予访问任何域上的资源的权限( i6 F2 n3 H/ F% N6 d ' r; e" J, F% ~# q (1)成员资格。混合模式可以包含来自同一域的用户账号。本机模式可以包含来自同一域的用户账号和全局组。4 j/ x0 u8 A( ~+ T " o8 k5 M E6 w) \(2)成员范围。在混合模式中,全局组可以是域本地组的一个成员。在本机模式中,全局组可以是任何一个域中的通用和域局部组,以及同一域中的全局组的成员。 d, r1 {5 \2 N0 l8 @ 3 c' J5 Y; x* s+ V( K0 E# ^+ C. x% D(3)作用范围。全局组在它的域及包括目录林中的所有域的所有信任域中都是可见的。 ) p8 i8 g! o- ^) e9 u# l! U / c X/ r' r2 B4 y; ^* v* P(4)权限范围。目录林中的所有域。 3 w- x+ w8 `% n2 Z, g" E% _$ e0 y1 n) G8 J2 v4 c. ?% r 4.域本地组. l5 l6 ?! s/ [- @' e 8 c& ^( @6 c& {# ~ 利用这一组作用域,可以授予访问域资源的权限。这些权限要位于创建该域本地组的域中,但是不必驻留在某个域控制器上。 " E! Y/ f5 H4 t$ E7 j ) {3 k. D( a; x(1)成员资格。混合模式可以包含任何域的用户和全局组。本机模式可以包含目录林中的任何域的用户账号、全局组和通用组以及同一域的域本地组。, ~8 \" D! [' A* ~; f4 e- q, P 9 {. @" i' j0 q/ c (2)成员范围。在混合模式中,域本地组不能是任何组的成员。在本机模式中,域本地组可以同一域中的域本地组的成员。 * E" ^$ g9 `( k6 a3 R0 R0 } . N; R3 h8 }8 \1 W% q0 O+ b(3)作用范围。域本地组只在它自己的域中可见。' W9 l' o; H; r ( d6 \0 l& j( u9 b5 ~- N" e(4)权限范围。域本地组位于其中的域。1 ]; E5 O) Q3 L! s0 O 4 x4 s j% O0 R 5.通用组 + r# o$ @/ o0 A S& J/ L9 i! s" U! v4 _ 利用通用组可以为多个域中的相关资源授权。利用通用组可以授予访问任何域上资源的权限。 5 o) E1 |1 f9 h: u! b % ^, x& M9 f4 a" F: ~* N! l+ B7 D(1)成员资格。在混合模式中不能创建通用组。本机模式可以包含来自目录林中的任何域的用户账号、全局组和其他通用组。 & W% e" F$ B$ v, T / b2 z6 y4 v7 z1 k$ p(2)成员范围。通用组在混合模式中不适用。在本机模式中,通用组可以是任何域中的域本地和通用组的成员。 * C& S* i! {' n( Z; g4 N9 f9 }5 [7 l$ H2 b; l$ A (3)作用范围。通用组在目录林中的所有域中都是可见的。, _$ ^$ D @7 j$ m5 g; ]" E' [ # U' M3 R b4 d(4)权限范围。目录林中的所有域。* X% z$ y. P Y" H ; B+ J/ I7 T9 K" v4 T1 P& W 6.在域中使用组的管理思想 - a: d h% G6 g& y" G. o6 j a O" s# v4 f7 h1 k6 L2 i 经过上面的介绍,相信大家知道组是可以嵌套的,而且有了组,对于多个相同权限的用户,再也不用分别给每个用户赋权了,只需给一个组赋权就可以了。那么在Windows 2000域中使用组应遵循什么原则呢?+ k; [# {6 r8 _5 }: u7 B g( L+ Q0 P1 Q4 V; U8 e% j+ `; l* {/ F 这个原则其实很简单,那就是:将用户加入全局组;将全局组加入域本地组;给本地组赋权。 : N# u6 b$ [) Z1 \1 u8 I7 U# O* D( a& m; j0 X. v, v+ B 这也就是AGDLP,其中A(User Account,用户账号)G(Globle Group,全局组)DL(Domain Local Group,域本地组)P(Permissions,权限)策略。这个策略是一种管理思想的体现,它提供了最大的灵活性;同时又降低了给网络分配权限的复杂性,尤其在有多个域时,这个策略就更加具有优势,如果只有一个域,那么这个策略就可以更简化了。 ! t6 T6 P% y' E& w1 \; X# [% t" \+ {$ g4 X! L+ ] 四、在活动目录上发布资源 9 o3 S) a5 R; R8 j- R" x! _% d发布的意思可以简单地理解为在活动目录中可见。在活动目录中发布资源要注意发布相对静态的、很少改变的资源。( H6 r( `" M9 e l$ i / p8 n* `- Z; e: P1. 资源的发布! C+ t- `. J1 ]5 b0 C6 F: \ (1)公布共享文件夹: & }& W1 k4 w% P7 v- d$ {, x# h8 n* y 要想将共享文件夹发布在活动目录上,就必须手工加入,而不会自动产生。 3 b( Q" k5 f0 _& d$ h- n1 G2 [$ T; u 首先在“Active Directory用户和计算机”窗口中双击域节点。然后右击想在其中添加共享文件夹的文件夹,选择“新建→共享文件夹”命令,打开共享文件夹对话框,键入文件夹的名称,键入用户想在目录中公布的UNC名称即可。% B6 H9 O/ D4 m% s G ) g5 B/ H6 t- u( P" o& @(2)公布Windows NT打印机: + X/ R0 M0 P* P4 t! ` 9 D( N. V9 h; H; b9 o! a域中的Windows 2000计算机上的打印机都将自动发布在活动目录中,下面我们讲述非Windows 2000计算机上的打印机。 ) y. j) Z( Q1 f# z6 ~9 O9 i. C1 K+ }- G v; N* d 首先在“Active Directory用户和计算机”窗口中双击域节点。然后右击想在其中公布打印机的文件夹,选择“新建→打印机”命令,打开相应的对话框,在其中键入用户想在目录中公布的UNC名称即可。 5 s! F! z# h3 @3 @1 b2 v8 d6 t& U/ N Q& V) p3 R$ u, t2.资源的查找 * T& F$ `; ]0 [3 o0 w9 O E/ K在“Active Directory用户和计算机”窗口中,右击域节点,点击“查找”命令,打开“查找”对话框,点击“自定义搜索”按钮。 % V. y: l D* s) Q, l l0 S0 \- y5 P i, W 点击“字段”,指向要搜索的对象种类,然后点击要为其指定搜索值的对象的属性;在“条件”中,点击搜索的条件;在“值”中,键入要应用搜索条件的属性值。点击“添加”按钮,将该搜索条件添加至自定义搜索。点击“开始查找”按钮即可开始搜索。 " \& `8 B* I% e. y( E; P " `& [: s; I: [重复上面的步骤可以添加所需的全部搜索条件。/ {; D8 Z3 p. J( o" @7 I 1 q& M; j7 [* X5 n7 ?五、实现组策略, ^; Q8 p' W0 Z, @7 c3 P0 P 组策略(GPO)为网络提供了比用户和计算机更多的管理控制能力。通过使用组策略,一旦定义了用户的工作环境,就可以依赖Windows 2000来连续推行定义好的组策略设置。可以将组策略应用到整个网络中,也可以仅将它应用到某个特定的用户或计算机组上。! P: Z. w2 m) A 9 Z# g" p: t/ r(一)组策略基础 % u; R7 y" S& t- B1.组策略的作用 1 W+ p) h6 B- A / d9 ?/ _. ?$ O% W4 e, ?+ n0 K使用组策略可以:- ~) a' e, c" i# `( m' \ ; p4 g7 r7 u' E2 |! X(1)通过站点或域的级别,为整个组织设置组策略的集中化策略,或者在组织单元的级别,为每个部门设置组策略的分散式策略。 % L3 }: \2 z* X+ D# o 9 _3 |, G% ~7 a6 y* _; \9 t(2)确保用户有适合完成他们工作的环境。' H& {& P+ a- Z2 T5 E3 \, Z/ C 2 W" |3 }: i9 f) s% Z! E0 G' B4 J(3)降低控制用户和计算机的总费用。) w7 ^+ f, z) l7 _ z* z. }5 ~* `$ R+ o 2.组策略类型 . A1 f- y, }3 S8 G* r% I5 P1 c, S& O0 F# y$ v7 Y* D& I 管理员模板:即基于注册的设定应用设置和桌面环境的设置。( p6 H' z! B! B) ^& ]& u: B; L 5 k3 I# ~0 Z3 |6 z o* ? 安全性:即配置本地计算机、域及网络安全性设置的设置。1 n8 k! H) z5 I5 I! c& X: w$ X 3 V8 i9 m) @8 D4 q9 f. m) \, C1 z 软件安装:即软件安装、升级、卸载的集中化管理的设置。. @+ N. q4 `. E+ A + @( f! Z n. P- u& ]2 M7 N- N命令:即当Windows 2000运行特定命令时的指定设置。% c2 W7 l3 v0 A5 q% s3 q4 S ( O' u+ f; _8 A. ?- G8 h u5 v远程安装服务:即当运行远程安装服务(RIS)的远程安装向导时控制用户可能的选项设置。 . {6 L+ J3 W! K" h 5 @5 z) D w+ f1 WInternet Explorer维护:即管理和定制基于Windows 2000计算机的Internet Explorer的设置。 5 X/ i3 {( J5 }, C. d% ` ! ~4 v7 ?. H; A3 ]! S文件夹再定向:即在网络服务器上存储用户个性化文件夹的设置。 - [6 y; i0 g; m6 }$ |, Q( L# o( [! M 3.计算机组策略和用户组策略! u+ M9 j7 @! Y' t( c/ |) R- A0 d: I% s6 M : g9 Z; s9 i; y5 m0 p% j: c 组策略中有计算机组策略和用户组策略设置。! R( }- X p/ {" A+ w* P ! {3 d& Z& E$ A. F5 I# J计算机组策略设置有:操作系统行为、桌面行为、安全性设置、计算机的启动和关机命令、计算机赋予的应用程序选项以及应用程序设置。& s8 B+ s( O5 T: I9 h. g 4 H1 `$ X4 p U) N用户组策略设置有:操作系统行为、桌面行为、安全性设置、赋予的和分布的应用程序选项、应用程序设置、文件夹的重定向选项以及用户登录和退出登录命令。# j* R2 o1 b' U ! |+ Z( L6 G+ q2 O" c注意:通常计算机组策略在和用户组策略冲突时,计算机组策略有优先权。 8 A- B" \8 T6 }3 Z7 Y 2 Z4 Z2 s8 T' Z8 S0 O2 ^将组策略和站点、域或组织单位链接后。组策略的设置将应用在站点、域或组织单位的用户和计算机上。管理员不能将组策略和默认的活动目录容器──计算机、用户和Builtin相连,因为它们不是OU(组织单元)。 * I2 g8 I6 J6 f' F! t% I; R6 `& M$ E" H+ {1 T (二)创建组策略和组策略的继承 % s2 X, E9 G/ ^) N1.创建组策略 ' A# v6 Q7 }) @! G. y9 _1 N& w* K % w6 I$ }2 x6 ^ ^8 @: H0 c( ]通过使用活动目录用户和计算机来为域和OU创建组策略,执行下面步骤:- b% H$ @& d3 z9 S) ]. v 3 b" q8 I9 E7 ~(1)在“Active Directory用户和计算机”窗口中右击想创建组策略的域或OU,然后点击“属性”命令。" X2 v% b* x( [, U 3 E/ a: N9 o, Z% e7 C (2)在打开的“组策略”对话框中点击“新建”按钮,然后为新的组策略输入名称,默认为“新建组策略对象”。8 S, Z$ _& d3 H0 b" V + A, [ M" l$ D* o" k: H+ d2.连接组策略0 o! M# \. K$ E( p( } 2 ^% h8 d9 |& Z9 C) z: T5 r连接一个已存在的组策略到域和OU上,执行下面步骤:4 d0 h3 b: l) u: t- ~6 p ] & Y8 ~, c7 c" P9 A! T$ n (1)在“Active Directory用户和计算机”窗口中右击想创建组策略的域或OU,然后点击“属性”命令。  8 l1 u3 `' X8 {3 Q0 z- T . T1 `+ l L# T6 Z (2)在“组策略”对话框中点击“添加”按钮。) @* j c3 _- x* d3 o% H0 x; U- W ) w0 a- C5 a& B2 T/ J8 e (3)在打开的“添加组策略对象属性”对话框中的“域/OUs”、“站点”或“所有”选项卡中,点击确认要连接的组策略即可。 / J& I+ ?1 k+ p, m' y) Y8 b; y K$ u8 U, z, F 注意:任何一个拥有该组策略的读写权限的人都可以对它做出修改。 $ A$ i9 y1 e/ e+ t4 X3 m% m! t$ F- S# I8 n' r8 [4 G 3.组策略继承 7 T2 c& l. t- }) t( d/ l- W& `: S, n. M2 J8 P. `+ z 组策略的继承性包括Windows 2000在活动目录中处理组策略的顺序,以及在连接到母容器的组策略的继承性。其继承流程是:8 k( [2 t. V; Z; ?" S- @ 8 |, \* n4 K, i% v/ r) E6 { 默认组策略被继承。子容器从父容器那里继承组策略,意味着子容器可能拥有多个用于用户和计算机的组策略设置。不止一个组策略与它连接。如果一个站点包含一个域以上计算机,连接到该站点的组策略中定义的组策略设置将应用到所有登录到该站点的计算机设置用户上,不管计算机和用户账号是否存在该域中。 ) K, V9 F! d7 q7 M# `" e# B! V# Q " Y+ P+ L1 G+ e域控制器每5分钟刷新一次组策略,重要的组策略设置将在危急的服务器中快速发挥作用。Windows 2000首先处理计算机设置,然后处理用户设置。 ; A8 t+ C9 Z. n: x$ ?( ? , v$ }: v" t0 G8 `6 V下表列出了客户端扩展和对应组策略设置类型(位于C:\Winnt\System32目录中):(^60090102d^) # y& T" a x! s- X' ]+ v& ~$ H g7 w' j! a! j5 t3 {: t7 T 4.解决组策略的冲突 , N! h& a9 D4 y& h) D& j9 O' d! {1 v9 t5 j 如果发生冲突,默认的是执行最新的设置;除非用户设置和计算机设置冲突。而在大多数场合下,计算机设置高于用户设置。组策略是累积的,除非两个或多个设置冲突,否则所有组策略设置都将被执行;当冲突发生时确定执行哪个组。 4 E# i; w* r6 f# |0 V+ ?% _( @ , d3 m- r \+ B5 Q, z% f策略设置的原则是:& S& l, P" L5 B 1 G F' ]4 q" T# _7 o( W(1)来自母容器的组策略设置,和来自子容器的组策略设置冲突,子容器的设置后执行并发挥作用。/ }$ B7 k% C; ?! Y* t 7 @. u% @2 ^, f, k, m) \(2)连接到同一容器上的,不同的组策略的设置发生冲突,在容器属性对话框中,组策略列表中最高位置的组策略设置后执行并发挥作用。组策略累积处理的例外是IP安全性设置和用户权限设置。当执行IP安全性设置和用户权限设置时,最新执行的组策略将改变以前组策略。 ( w D6 x3 h# @3 }: P4 y1 {9 `* C5 ]* O* _ a; X 5.修改组策略的继承性, C" _& h! ?! b ^$ I* g' p l7 P* R 阻止继承,将不允许子容器从母容器那里继承组策略设置。允许在一个子容器阻止继承,将阻止容器所有的组策略设置而不是单个设置。当活动目录的容器需要唯一的组策略设置,和需要确保设置不被继承时,这一功能将是很有用的。+ S& v- X- P$ C% O ! w& ~( ? u. e2 H 阻止子容器的组策略容器继承,执行下列步骤: ; b) F, \5 M; v( G 2 N- `9 F% d% J4 Z! e(1)在“Active Directory用户和计算机”窗口中打开想阻止继承的域或OU的“属性”对话框。/ J9 {( k) F% r ! s3 q/ _; u4 x) t* K. ^ (2)在“组策略”对话框中,点击“阻止组策略继承”项即可。 8 ?* w# K4 u/ X8 ~- a * Y6 m O1 D* T) V" Y注意:阻止组策略继承的两个局限。即你无法选择阻止哪个组策略;不能阻止连接在母容器设置为不重写(禁止代替)的组策略。& z3 C! E7 c% ?1 R o9 t " h! s, Z! D; I0 a" }$ [" M( p' b 6.监控组策略 U* T# Z' D" C/ s5 Q2 n& ?5 \5 C & {' r) A# X4 m F# ^2 C7 C(1)启用诊断记录:" i) N0 B) B/ {0 u8 R2 b $ D! [6 Z& A2 v" G7 y- m) W启用组策略的诊断记录,促成组策略在事件日志中产生具体事件。这些具体事件,能够通过返回事件以及提供附加信息,在诊断组策略执行相关问题时提供帮助。 : I- y8 l/ _6 z1 H5 j, z $ P. B3 l% Y9 p1 {, `9 ~以本地管理员的身份登录,然后点击“开始→运行”,在“打开”对话框中输入Regedit,打开注册表的编辑器。定位至HKEYLOCALMACHINE\Software\Microsoft\WindowsNT\Current\Version,然后点击“编辑→新建→项”命令,输入Diagnostics后按回车。! l0 @- @8 y1 O% S * v- w( M1 t+ s- ^! A 选择上面建立的Diagnostics项,点击“编辑→新建→双字节值”命令,输入RunDiagnosticsLoggingGlobal后按回车。 - W$ D/ k' n7 n. W3 @5 ]9 c( b3 t& ~, l6 S& d 最后双击RunDiagnosticsLoggingGlobal,输入1即可。 2 Q: i2 @' u' M& J% {3 F9 r2 C. s" ?- X& m/ q (2)启用详细记录:. u$ u; I3 b* @1 d9 r% g & o: ^! Z5 p( I详细记录将记录所有的变更和应用到本地计算机和登录计算机的用户的设置。日志文件位于Systemroot\Debug\Usermode文件夹下,命名为Userenv.log。启用详细记录将涉及添加详细记录的注册关键词。; |4 W( C0 i- {! [! I! x 2 ]$ X; X l: o K8 F为了允许详细记录,添加名为UserEnvDebugLevel值为30002双字节记录值到注删表中的HKEYLOCALMACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon下。2 T+ `8 m6 \ s" q2 [ # w b2 k. `: q) y" d注意:30002的值允许详细记录,30001仅允许错误和警告记录,30000不记录任何事件。 ! C- G+ Z7 u4 B- o, Y1 I6 K h$ O' @, L; Y/ \2 b (三)利用组策略$ \$ b) f2 Z- c( W' S 1.组策略管理用户环境/ K. ~" \7 U0 D2 [ 0 ], j: J5 D& [9 D4 J4 Z 管理用户环境意味着用户在登录网络时,控制用户有哪些权力。可以通过控制用户的桌面、网络连接和用户界面来控制用户权力。控制用户环境可以确保用户有执行他们工作所需要的权力,但不能破坏或不恰当地配置他们的环境。( _) X# }( B7 v' l1 m 3 S# C, P9 f% ]用来管理用户环境的四种典型组策略设置类型是,管理模板设置、脚本设置、文件夹重定向和用户界面。% z% ~5 k+ F+ N4 R& S , X/ Z- h7 i3 A ?' d组策略管理模板是用来管理用户环境的,基于注册的设置。该设置将修改存放在两个注册表目录树下的设置。其中:; Q3 @: L: D Q' t6 ] . K$ I/ u6 h$ D1 b" l计算机设置:在HKEYLOCALMACHINE\Software\Microsoft\Windows\CurrentVersion\Policies中。 + Z# T; ?9 R6 X " p1 V; m' L0 G3 }% _4 Z2 ]/ w用户设置:在HKEYCURRENTUSER\Software\Microsoft\Windows\CurrentVersion\Policies中。 3 }8 W7 S# W: d1 ^- V" a. b) {6 f 2.管理模板设置的类型 . X, |1 E) ?, s- f' b/ W 5 i3 d! o6 g4 R5 [# P- J" W管理模板设置的类型分为七种,都是用户和计算机的设置: + ?, p8 e ?9 u0 k( x4 J 8 K i" V* x# E/ `, w' r \2 h(1)Windows组件:用户可以访问的Windows 2000及其工具和组件部分。计算机和用户为该设置类型的使用者。 ) C! M, u' G# d0 `4 a/ O3 Q0 b ! B/ A/ ]! Z8 t P: S3 @% {% \(2)系统:登录、退出过程。利用系统设置,可以管理组策略、更新区间、启用磁盘限额和实现回环处理。计算机和用户为该设置类型的使用者。; U- f+ X- y, k \ : {0 w' ]( n. p(3)网络:网络连接和拨号连接的属性。计算机和用户为该设置类型的使用者。 * M: D8 V B! J! i# e! v! Q+ e- o+ ^! |! y7 [0 p (4)打印机:打印机设置,可以是自动公布在活动目录中的打印机,并使基于网络的打印无效。计算机为该设置类型的使用者。% n; l$ B( w) }$ d+ M% z % z; s1 H" @* |# ^! w. x (5)开始菜单和工具栏:用户可以从开始菜单中访问的功能组件。用户为该设置类型的使用者。 : j7 M1 t/ H7 j4 H4 x$ J( v! I. F6 d& L+ L: a: u (6)桌面:活动桌面。通过隐藏某些桌面图标并控制用户对“我的文档”文件夹使用,可以控制用户对网络的访问。用户为该设置类型的使用者。 # ?9 W* S: T5 ~4 l2 f( k5 R% N1 U& K+ t, K6 s (7)控制面板:控制面板上的一些应用程序。用户为该设置类型的使用者。 2 {0 C7 v: b# x. S! C% F4 E5 i$ E+ X2 U2 X( E 禁用桌面的设置。如下表所示:(^60090102e^)( V5 \, e" q9 Z b0 U4 V $ c! \$ R+ k$ P `, h" g( l9 q3 d4 q 禁用用户访问网络资源的设置。如下表所示:(^60090102f^) 1 w7 {6 N1 h" Y+ s. L0 V# u& P! D- K" K( `2 v 禁用用户访问管理工具和应用程序的设置。如下表所示:(^60090102g^) 4 b& K; u$ \! O# |8 E2 S: Z4 X. i8 t8 B7 g* [# G 3.组策略中的回送处理模式% }5 K4 _3 N/ [: Z% X, u6 t$ Z - I# f( z$ |% p9 b$ L, w组策略回送处理模式,可以把用户管理模板设置实现到计算机上。回送处理模式是实施应用于计算机的组策略中的用户配置设置的组策略。对于指定具体任务的计算机或安装了特殊软件的计算机非常有效,按下列步骤启用回环处理模式: t2 S4 N ?6 J ( F& m6 s. T( L(1)打开组策略,展开“计算机配置→管理模板→系统”节点,点击“组策略”选项。 9 I; I) D) e$ \ 9 l. G* D' G" I(2)双击“用户组策略反向对应处理方式”选项。: z/ M6 [% s1 Q! c- s! b ; a; C! y/ a6 s3 b* P (3)点击“允许”按钮,然后在“模式”中选中“替换模式”或“合并模式”。“替换模式”处理应用于计算机的组策略;“合并模式”首先处理应用于用户对象的组策略,然后处理应用于计算机对象的组策略。如果设置发生冲突,将实施组策略中的计算机对象设置,因为这些组策略设置最后使用。" f; x2 B0 U! _/ N% y0 _ ) k8 A% q3 u' z# ]( [2 j 4.设计组策略模板3 u* `5 ~! Y6 n 6 f' W, w q# ^# o$ G 通过在组策略中配置管理模板扩展名中的设置,实现管理模板的设置。在组策略“属性”对话框中的三个状态说明如下: Y7 g3 ?- p" r# i: n" C* u. K # Q- a1 k% Q& H; j' G6 I6 r" Y未配置:不对计算机产生任何变化。' C" }6 T ]* i! [$ T( W. Q + y q# G% o9 b, V6 o启用:把引起的变化添加到注册表中。 3 D" I! y! \- Q3 o8 N/ i- x5 r; L4 p4 j( a' ]% q2 ?- k) \: h5 J4 | 禁用:防止引起的变化添加到注册表中。0 @; V2 R! ?' H* _3 F! m! Q* b 0 V7 w( z6 D2 q/ | G* Y5 k 右击合适的站点、域或OU,点击“属性”命令,然后点击“组策略”选项卡,建立或选择现存的组策略,点击“编辑”按钮。 5 @7 o' ~, y6 T. ~: s ( ] w5 T: {: A在组策略中,展开“计算机设置”或“用户设置”选项,然后展开“管理模板”直到确定需要修改的位置。最后在组策略属性面板中,双击需要修改的组策略设置。 : Z- t* A# M, E+ I6 J/ f( L4 M3 S8 O; g' O 5.用组策略分配脚本 $ {3 C$ N4 B, {) r/ [3 R8 C) g( N; D 利用组策略脚本设置,可以把脚本设置成在指定的时间里自动运行。管理员可以利用策略中的脚本扩展来运行批处理文件、可执行程序和支持脚本的Windows脚本主机。组策略脚本设置可集中配置脚本,在计算机启动、关闭、用户登录、退出的时候自动运行。 4 k7 f- ?2 _" Q# j8 h + q& H* b: f* B! GWindows 2000按下列的顺序处理并运行指定脚本的组策略:# e* G3 O- [* K( V' i' L) U. ? 4 ~/ M: M! v% h: z( ]' p: ?$ X (1)当用户启动计算机、进行登录时,存在以下几种情况:启动脚本缺省情况下,隐藏、同步运行;登录脚本缺省情况下,隐藏、非同步运行。 4 O& R6 `$ V$ j: j, I/ Y1 g8 V' m" I! _1 C; | (2)当用户退出、关闭计算机时,存在以下几种情况:退出脚本运行;关闭脚本运行。 & n, y1 v& H! R6 v ) i3 Z0 M { z2 n( U/ z注意:处理脚本缺省超时时间是10分种,如要调整时间,可以配置Computer Configuration\Administrative Templates\System\Logon\Maximum wait time中的组策略脚本的等待时间,改变后将影响所有运行脚本。 : l" F, Q- u+ O8 Q0 Q6 S1 P+ a, `* s 我们可以按下列步骤分配一个脚本:6 t1 w0 {( J) _% H0 t $ I. Z" W: A; b! @* |. W(1)打开组策略中合适的组策略,展开“计算机配置”或“用户配置”,展开“Windows Setting”,点击“脚本”按钮。 ' L5 o: Q, h) @/ e9 ?' O5 U0 ^: Q& f7 Q/ v ?# ~ (2)在脚本的“属性”对话框中,点击“添加”按钮,点击“浏览”按钮,选择需要分配的脚本后点击“打开”按钮,添加需要的脚本参数即可。8 {. d% W, j" ]' D% F , F! x2 D- f; I# R7 c. V, j6.利用组策略重定向文件夹 ) o+ ^; W! L. R& @6 V2 ^. L; H3 v0 ]! w: L4 U6 N! F 重定向文件夹,可以确保用户可以获得数据,不管他们在什么计算机上登录。 8 K R0 Y( n) t* W5 X9 T; A# _$ D! b. f% [ 可以重定向文件夹有:我的文档、应用程序数据、桌面和开始菜单,Windows 2000会自动建立这些文件夹。 ; R# ^. }' I: l* \$ F5 c3 @" ~ 5 @) d. I9 f7 I利用重定向文件夹,我们可以:不管用户从什么客户计算机上登录,都可以访问文件夹中的数据;文件夹中的数据集中存储,因此文件夹中的文件将更便于管理和备份;减少网络通信;重定向文件夹的文件,可以当用户登录到客户计算机上的时候,不使用存储空间存储这些文件。9 e0 }9 c; ], c+ Y! k5 V, o {& c & c/ j: x/ d: K 如果管理员在重定向文件夹的时候使用变量%Username%,那么Windows 2000将为每个用户在服务器上建立唯一的个人文件夹。按下列步骤重定向文件夹:8 _" j$ g8 W8 r2 C) E3 x $ d5 _; t+ P1 ~) A (1)在“组策略”对话框中点击“编辑”按钮。: Z; t2 h7 U. d2 K" v, s 3 q ^; C2 D, A (2)展开“用户配置→Windows Settings→文件夹重定向”节点。然后右击要重定向的文件夹名字,点击“属性”命令,然后提供目标路径和位置路径即可。/ G% Z- J$ k% X. G" L; U* I : Q/ c% {" s" q8 \7 y% Z3 B 7.利用组策略确保用户环境安全; K2 \7 ^2 |) I* o# ^ " K L# w+ X. O, M* G& j( w L域用户策略成为域成员的、基于Windows 2000的工作站或服务器的预设用户策略,例外的是组织单元定义另一个用户策略的时候,组织单元的用户策略设置影响到组织单元中任何计算机上的本地策略。而本地策略设置只在利用计算机本地用户登录时候应用。按下列步骤把安全模板引用到组策略中:7 R4 x8 g$ {6 }& a/ m , |+ w: g: [' ]; h5 V/ Y展开组策略中的“计算机配置→Windows Settings→安全设置”节点。右击“安全设置”,然后点击“引入策略”。选择需要引用的安全模板即可。 ' [' D# v, ]7 _, f! e, e+ n + P# F& ]% i ]/ m1 p6 m另一种应用安全策略的方式是为每台计算机配置安全设置,要配置安全设置,需要执行下列任务: 7 ^9 s0 \( `$ i, e# M3 z& w" }8 u& g; g 展开“计算机配置→Windows Settings→安全设置”节点。在策略属性对话框中,双击需要配置的安全设置。在“策略”选项卡上,通过选择三种状态的一种来配置安全设置:启用、禁用、未配置。3 I3 x+ D( |/ W/ d" @9 ?9 Y6 m$ U5 S . D( B- z* p' }; ?! w六、使用组策略管理软件 6 ]1 d& T* h1 ? t2 ~' ^1 \(一).使用组策略管理软件' o, P t) L n 管理软件的过程包括: : P* U7 G6 T) y. x8 g/ k, T4 S E" \ 预备:准备一个文件,以便应用程序能使用组策略布置。7 [, Y' x3 s, k# Y; N2 R9 C) \$ Y & y8 _- ?& i* Z( {' C+ M布置:管理员创建一个在计算机上安装软件,并将组策略链接到相应的活动类别容器的组策略对象。 " z4 _; ~. J3 `* ] 9 A: h4 K4 \% z4 `( M# p9 F维护:用新版本的软件升级软件或用补丁来重新布置软件。2 x/ m/ t. _: n $ |' E% y8 H# \! I) n w 删除:为消除不再使用的软件,从开始布置软件的组策略中删除软件包设置。 " d# _$ u$ R, O- ]# l# l5 H% m7 { b5 g 将软件分配给用户和计算机:9 j7 E& B; X. W) ^ 4 S" H" o, K3 j& t: ]. g% x在用户配置过程中,在用户登录时应用程序被通告,安装不会自动开始。这样可以节省了硬盘空间和时间。, j# M9 a& B, Z$ y - r J/ W' l8 h. w 在计算机配置过程中,当给计算机分配软件时,不会出现通告,软件被自动安装。可以确保相应的应用程序在那台计算机上总是可用的无论谁使用那台计算机。 ( h* {2 s; Y4 k/ w2 j0 @* B! E7 y & g4 x- Q' K1 s% @' f) u2.用户安装发布的软件0 e1 R4 ]* F0 X+ e7 i2 u, s 可以将软件分配给用户和计算机。分配软件包确保软件对于用户和计算机是可用的。分配软件确保用户需要的所有应用程序都安装到了他们的计算机上,用户下一次登录时,新安装的软件会出现在他们的桌面上。当软件出现后,应用程序的开始菜单快捷方式和桌面图标也出现了。0 b: m* y4 Y i " p) I3 o3 Y) a; X7 ` 用户可以采用下面两种方法之一来安装发布的软件:, Y& B% z9 b4 k : r! ?% ^1 j( ~ q& f1 f& Q (1)使用控制面板双击“添加/删除程序”,选择需要的应用程序,点击“安装”按钮。6 U% Z! ~% T# I3 ?0 p$ v ! N, r5 ]+ h" m+ I(2)使用文档激活的方法。当应用程序发布在活动类别中时,它所支持的文档扩展文件名在活动类别中注册了, 如果双击一个未知类型文件,计算机就会安装它。0 @# F' \& g. d, q1 H 7 C; V/ Q/ H2 U3.布置软件8 ~6 \7 f* m) u4 P 按下列步骤使用组策略布置软件:+ j1 m; R* |6 L: P/ [ * r" `- |1 u+ M(1)根据软件是分配给用户还是计算机,在“用户配置”或“计算机配置”中创建或编辑一个组策略。4 k T% T/ [* s) q5 n$ k( ^4 i & C% R* U0 G; d; z* k$ O+ E (2)布置“软件设置”,右击“软件安装”,选择“新建→程序包”命令,当“文件打开”对话框出现时,选定包文件,点击“打开”按钮。; |$ T6 J& z( _- K1 U9 t( U / @* E7 ^5 E/ F (3)在“布置软件”对话框中,选定一种布置方法即可。 / G1 S: C8 e9 S* o: n& |& \% ~; T/ Q. x2 \5 ]* ~* S* y 改变一个软件包的软件布置选项,执行下列步骤:& Z; h* [0 K. [$ P7 ^ 1 ?6 }( i1 n# E) G/ x (1)在软件安装中,右击布置的包,然后点击“属性”命令。 " Y, V* c5 U4 m2 o$ w3 X2 _4 U( G8 r9 [$ N (2)在应用程序的“属性”对话框中,点击“布置”选项卡,设置下表描述的选项的任意组合。(^60090102h^) n* {0 I9 v' h8 D6 t1 [+ Z& X+ [3 l% G9 G# M6 X 设置软件安装默认选项,请执行下列步骤: 0 V- p* r' ]" f' J5 x' s ( d9 `6 U9 \" N5 J$ ~$ J# |1 m(1)根据软件是要分配给用户还是计算机,或是发布,在“用户配置”或“计算机配置”中创建或编辑一个组策略。, f/ u1 S8 v7 p7 W( [# | h ! l4 c2 ? Z, ^8 k(2)布置“软件设置”,右击“软件安装”,点击“属性”按钮。% ], D6 L* ?" ^: b3 m. n 7 W+ p' M) U( s. o+ J, s+ Q(3)在“软件安装属性”对话框中,点击“常规”选项卡,设置下表描述的选项的任何组合。(^60090102i^)(^60090102j^) - Z; k) |* n) W: e' s ; p# Y/ k/ [ z+ x' i& n可以布置一个应用程序的几个不同配置并且控制如何分配或发布应用程序。使用软件修改,执行下面步骤: 2 C6 S+ ]8 c, ^, ?- n x0 m: L% k% z (1)在将一个新包添加到一个组策略中或在此包布置前,打开应用程序包的“属性”对话框,点击“修改”选项卡。点击“增加”按钮。 / x, ?% L' z2 w- u4 B# Q# z h P( V" a( @. [8 F (3)在“打开”对话框中,选择修改(.mst)文件的路径和文件名,点击“打开”按钮即可。: t. G* l2 Y/ r: j5 { 7 N% f* K! w- z& p 4.创建软件类别 # h0 f8 l1 f7 i. g6 O7 `创建软件类别,执行下面步骤: . i8 r8 I5 s/ h3 E- I$ L+ `# k 3 p. S: q# ]+ s# z7 _(1)根据软件是要分配给用户还是计算机,或是发布,在“用户配置”或“计算机配置”内创建或编辑一个组策略。 5 v" C$ Q% u8 U5 ?4 j% }5 g% n8 k2 h. W (2)布置“软件设置”,右击“软件安装”,然后点击“属性”按钮,在打开的对话框中点击“类别”选项卡。 6 ]1 p# P* I9 Z* U7 Q; j: z1 Z7 \2 f (3)点击“增加”、“修改”或“删除”按钮创建并编辑类别名。 / q" c r2 w1 o / N+ ]0 C: Q- X5 M) n" j管理员还可以控制哪个应用程序首先和文件扩展名关联。修改文件扩展名优先权,执行下列步骤: : S, m( c! M& ^; F' x6 ?: C$ N- Z- S [& K (1)打开用于布置应用程序的组策略。布置“用户配置”,然后打开软件安装的“属性”对话框。 6 H+ ^. I7 o: j( A* t$ L% o; D7 |( b* w1 y2 U (3)在软件安装的“软件安装属性”对话框中,点击“文件扩展”选项卡,单击(向上)或(向下)来设置优先次序。 / D* r! w% ~6 M6 r( _$ i6 V, N' U0 J! H* y 5.维护布置的软件3 a: v* p8 Y z3 l. ]! c 维护布置的软件在于:升级布置的软件、重新布置软件。升级布置的软件:可以进行强制升级或可选升级。强制升级用于强迫用户升级到当前最新的版本。可选升级用于允许用户同时使用一个程序的两个版本。为布置一个升级,执行下列步骤:: n1 g! m) U0 F- B; I, S - o% r& j% d6 I* D(1)布置高一级版本软件。. t% L' y1 K5 R+ ?; y# N1 X / ?" w; l: e9 H6 ~' b+ y. V; r# q (2)打开“软件安装”,右击高一级版本,然后点击“属性”按钮。在包文件的“属性”对话框中,点击“升级”选项卡。在“Packages that this package will upgrade”部分,点击“增加”按钮,选定低版本应用程序。 : R. [" @# w0 H( U9 u3 A) N2 A- g4 @& h& r" W" f9 N8 H0 l (3)选择升级类型:为进行强制升级,选定“现存软件必须升级”复选框;为进行可选升级,取消选定“现存软件必须升级”复选框。0 ]$ I* C6 }* }6 a 5 j1 W4 X- ] w! b0 n6 j- ` |6.删除布置的软件 , j( u5 Z+ x+ L) _& F0 S N. R删除布置的软件,执行下列步骤: : A# q0 R: Z6 A6 U' T! ^+ C; _. @$ f6 b; @$ s1 Q) r (1)打开原来用于布置软件的组策略。在“软件安装”中,右击包名,选择“所有任务→删除”命令。 ; r/ \7 o/ b) r# j * ~) s9 S% O! \& L(2)在“删除软件”对话框中,选择下表描术的选项中的一项,然后单击“确定”按钮。

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧