banner
 .::Windows::. Command line cho Network Admin OS Microsoft Go to original post Author: thangdiablo - Translator:  - Entry Date: 28/02/2009 02:16:25
Tạo User bằng Command Line ngồi từ máy user

connect bằng quyền admin và....


NET USER [username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]

Ví dụ một trường hợp
NET USER THUNGHIEM /ADD sẽ add một user vào Group User với password rỗng.
NET USER TEST 123 /ADD sẽ add một user TEST với Password là 123 vào Group User hoặc Domain user.
Chú ý, nếu chỉ sử dụng trong môi trường Group thì chỉ có thể tạo được User ở máy Local.
Nếu dùng trong môi trường Domain, mọi chuyện lại dễ.
Ngoài ra, còn những Option khi tạo User (giống như động tác click chuột trên GUI)

Options Are as follows:

Options Description
--------------------------------------------------------------------
/ACTIVE:{YES | NO} Activates or deactivates the account. If
the account is not active, the user cannot
access the server. The default is YES.
/COMMENT:"text" Provides a descriptive comment about the
user's account (maximum of 48 characters).
Enclose the text in quotation marks.
/COUNTRYCODE:nnn Uses the operating system country code to
implement the specified language files for a
user's help and error messages. A value of
0 signifies the default country code.
/EXPIRES:{date | NEVER} Causes the account to expire if date is
set. NEVER sets no time limit on the
account. An expiration date is in the
form mm/dd/yy or dd/mm/yy, depending on the
country code. Months can be a number,
spelled out, or abbreviated with three
letters. Year can be two or four numbers.
Use slashes(/) (no spaces) to separate
parts of the date.
/FULLNAME:"name" Is a user's full name (rather than a
username). Enclose the name in quotation
marks.
/HOMEDIR:pathname Sets the path for the user's home directory.
The path must exist.
/PASSWORDCHG:{YES | NO} Specifies whether users can change their
own password. The default is YES.
/PASSWORDREQ:{YES | NO} Specifies whether a user account must have
a password. The default is YES.
/PROFILEPATH[:path] Sets a path for the user's logon profile.
/SCRIPTPATH:pathname Is the location of the user's logon
script.
/TIMES:{times | ALL} Is the logon hours. TIMES is expressed as
day[-day][,day[-day]],time[-time][,time
[-time]], limited to 1-hour increments.
Days can be spelled out or abbreviated.
Hours can be 12- or 24-hour notation. For
12-hour notation, use am, pm, a.m., or
p.m. ALL means a user can always log on,
and a blank value means a user can never
log on. Separate day and time entries with
a comma, and separate multiple day and time
entries with a semicolon.
/USERCOMMENT:"text" Lets an administrator add or change the User
Comment for the account.
/WORKSTATIONS:{computername[,...] | *}
Lists as many as eight computers from
which a user can log on to the network. If
/WORKSTATIONS has no list or if the list is *,
the user can log on from any computer.

Những Option trên chính là những phần Click chuột mà bạn thường hay sử dụng khi tạo trong Computer management, hoặc là dùng AD Computer and Users.

Ứng dụng tốt nhất của việc dùng Command line là: Bạn có thể tạo ra cùng một lúc nhiều User có chức năng tương tự nhau, bạn chỉ mất khoảng thời gian Edit và Test command đầu tiên, sau đó chỉ việc Copy và chỉnh sửa chút xíu, là có thể tạo thành một Teplate hoàn chỉnh rồi.
Good luck!
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Other posts in the same group:

Command line cho Network Admin OS Microsoft
Go to top Go to original post  

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|