windows server 2003批量增加用户-addusers

windows server 2003批量增加用户的方法有很多,比如net、csvde、ldifde、dsadd、addusers等,这里将逐一介绍。

addusers
addusers命令是DOS的外部命令,下载路径:ftp://ftp.microsoft.com/bussys/winnt/winnt-public/reskit/nt40/i386/addusers_x86.exe。

详细的使用方法可使用addusers_x86.exe /?查询,下面列出英文帮助原文:
Command-line account manipulation utility version 3.0.0.1
Copyright Microsoft Corporation 1998.  All rights reserved.
 
Adds, Writes, or Erases accounts as specified by a delimited file.
ADDUSERS {/c|/d{:u}|/e} filename [/s:x] [/?] [\\computername|domainname] [/p:{l|c|e|d}]
  /?    Display this help screen.
  /c    Create accounts specified in the file.
  /d:   Write current accounts to the specified file, opt. followed by {:u}.
    u   Write current accounts to the specified file in Unicode text format.
  /p:   Set's account creation options, followed by an comb. of {lced}
    l   Users do not have to change passwords at next logon.
    c   Users cannot change passwords.
    e   Passwords never expire. (implies l option)
    d   Accounts disabled.
  /e    Erase user accounts specified in the file.
  /s:x  Sets the separator character for the input/output file.  Replace the
        x with the character to be used for separating fields. (e.g. /s:~)
        Note: The separator character is a comma ',' by default.
 
For detailed information please refer to the Resource Kit Help file.

用法示例:
导出当前用户:
addusers /d:u c:\users.txt
/d:u参数中:u是必须的,如果不加u,那么中文的2000将导不出用户和组的中文描述。

批量添加用户:
1、建立用户属性文档
[User]
laud,laud,laud,,,,

[Global]

[Local]
Enos_YY,YiYang,laud,
Remote Desktop Users,RDU,laud,
#注意组要以逗号结尾
2、执行命令
addusers \\wgcnms1 /c c:\user.txt /p:e
参数解释:
计算机名:要建立帐号的计算机名
/c:使用文件引入用户列表
file path:加/c参数后,指定文件路径
/p:l/c/e/d:帐号选项,其中:
l:使用者下次登录时需更改密码
c:使用者不得变更密码
e:密码永远有效
d:帐号暂停使用

转载于:https://www.cnblogs.com/laud/archive/2009/08/19/1549989.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值