Listing 4: Invoking adduser with a simple script.
清单4:用简单的脚本调用adduser。
You could use SSH to do this for you by running the adduser command across multiple machines.
您可以使用SSH在多台计算机上运行adduser命令,以完成这项任务。
Listing 8 is a sample shell script that ACTS as a wrapper around either the adduser or useradd command.
清单8是用作adduser或useradd命令的包装的示例外壳脚本。
Add a one-way operation named addUser which has an input parameter named user of type PasswdEntry (Figure 4).
添加一个名为adduser的单向操作,该操作具有一个PasswdEntry命名用户类型的输入参数(图4)。
Just have your script ask for user name, password, home directory, etc. and invoke adduser with a system call.
这里只是让脚本询问用户名、密码、主目录等等,并以system调用来调用adduser。
For example, if you are using a Unix operating system, you need to use the a "u option of the adduser command."
例如,如果使用Unix操作系统,则需要使用adduser命令的—u选项。
Most standard UNIX systems have adduser (or useradd) and addgroup (or groupadd) commands available to the administrator.
大多数标准的UNIX系统都为管理员提供了adduser(或useradd)和addgroup(或groupadd)命令。
We add these users to the predefined group of AFS system administrators system:administrators using option adduser of pts.
我们使用pts的adduser 将这些用户添加到AFS系统管理员系统预先定义的组:administrators。
You can write your own adduser.pl script, ), --> or you can use the adduser program provided with most modern UNIX systems.
可以编写自己的adduser.pl脚本,或者用大多数现代UNIX系统提供的adduser程序。
You can quit adduser any time by typing Ctrl - C , and at the end you will have a chance toapprove your new user or simply type n for no.
可以在任何时候键入Ctrl-C退出adduser,最后将有一次机会来批准你的新用户,否则简单地键入n选择no。
Make sure the syntax is consistent between all the UNIX systems you will use, but don't try to write a universal adduser program interface.
请确保使用的所有UNIX系统间语法是一致的,但不要尝试编写一个通用的adduser程序接口。
First, type adduser into the console screen and follow the instructions to add a user to log in with an associated password. Then we need to upgrade the system by running the following.
首先,在控制台里输入adduser,根据说明添加一个可以使用联合密码登录用户。
These are not supported on Solaris but, if you create a shell script with the name adduser, you can simulate the Linux version and then run the real Solaris useradd command with appropriate options.
这些扩展选项在Solaris 上不受支持,但是,如果创建一个名为 adduser的外壳脚本,您就可以模拟Linux版本,然后用适当的选项运行实际的 Solarisuseradd命令。
These are not supported on Solaris but, if you create a shell script with the name adduser, you can simulate the Linux version and then run the real Solaris useradd command with appropriate options.
这些扩展选项在Solaris 上不受支持,但是,如果创建一个名为 adduser的外壳脚本,您就可以模拟Linux版本,然后用适当的选项运行实际的 Solarisuseradd命令。
应用推荐