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
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!
Cấu Hình IP bằng command line
Để cấu hình địa chỉ IP, DNS, WIN bằng command line.
Các bạn thực hiện các bước sau:
Vào của sổ command prompt.
gõ lệnh:
netsh <Enter>
interface IP <Enter>
< Set IP Address >
set address name= "Local Area Connection" source=dhcp <Enter>
set address local static <IP Address> <IP Supnet Mask <Enter>
vidu:
set address name= "Local Area Connection" source=dhcp <Enter>
set address local static 192.168.1.2 255.255.255.0 <Enter>
< Set Preferred DNS Server >
1. Logon ở máy PC1 bằng tàu khoản (thuộc nhóm
Domain Users). Chú ý tài khoản này không có quyền hạn gì cả. Nhưng
chúng ta sẽ sử dụng RUNAS với tài khoản là để
làm thao tác shutdown máy PC2
2. Vào RUN gõ : runas /user: "mmc %systemroot
%/system32/compmgmt.msc"
SAU ĐÓ : gõ password của
3. Ở Computer Management[với quyền ], Chọn
mục : CONNECT TO ANOTHER COMPUTER, gõ IP của PC2 hoặc tên
máy là PC2.
Chọn PROPERTIES | tab Advanced| tab STARTUP and RECOVERY |
tab SHUTDOWN và SHUTDOWN máy PC2.
4. Hết rồi
Chúc các bạn thử thành công.
PS : Chú ý là vừa sử dụng RUNAS vừa SHUTDOWN từ xa.
Nói về commandline, tui xin góp 1 lệnh nhé
C:\>nslookup
Default Server: hcm-server1.vnn.vn
Address: 203.162.4.1
Aliases: 1.4.162.203.in-addr.arpa
Cho bieát DNS server mà client gởi query lên ở đâu !!?
C:\>nslookup ?
Usage:
nslookup [-opt ] # interactive mode using default server
nslookup [-opt ] - server # interactive mode using 'server'
nslookup [-opt ] host # just look up 'host' using default server
nslookup [-opt ] host server # just look up 'host' using 'server'
C:\>nslookup www.yahoo.com
Server: hcm-server1.vnn.vn
dns3.name-services.com internet address = 63.251.83.36
dns4.name-services.com internet address = 64.74.96.242
dns5.name-services.com internet address = 212.118.243.99
dns5.name-services.com internet address = 212.118.243.100
dns5.name-services.com internet address = 212.118.243.101
Query MX record : danh saùch mail server
> set type=A
> yahoo.com
Server: hcm-server1.vnn.vn
Address: 203.162.4.1
Aliases: 1.4.162.203.in-addr.arpa
Non-authoritative answer:
Name: yahoo.com
Address: 66.218.71.198
Query A record(Host) cuûa moät server
> set type=SOA
> yahoo.com
Server: hcm-server1.vnn.vn
Address: 203.162.4.1
Aliases: 1.4.162.203.in-addr.arpa
DNS request timed out.
timeout was 2 seconds.
Non-authoritative answer:
yahoo.com
primary name server = hidden-master.yahoo.com
responsible mail addr = hostmaster.yahoo-inc.com
serial = 2004021604
refresh = 900 (15 mins)
retry = 300 (5 mins)
expire = 604800 (7 days)
AD Schema Manager schmmgmt.msc
AD Users & Computer dsa.msc
Backup backup
Certification Authority certsrv.msc
Component Services comexp.msc
Computer Management compmgmt.msc
DHCP dhcpmgmt.msc
Distributed File System dfsgui.msc
DNS dnsmgmt.msc
Domain Controller Security Policy dcpol.msc
Domain Security Policy dompol.msc
Event Viewer eventvwr
Indexing Service ciadv.msc
Internet Authentication Service ias.msc
Internet Service Manager iis.msc
Local Security Policy secpol.msc
Network Monitor netmon
Routing & Remote Access rasmgmt.msc
Task Manager taskmgr
Telnet Server Administration tlntadmn
Terminal Service Manager tsadmin
Terminal Service Client mstsc
/> !"#$%&'
$(&&)*+,-&&./&0
%&12,34&05!"6678
90:!&9;<&.!9=000
7:>,?905@A&BCDE&F
5G:(&H590C<=9B5I0J52:
7<K0FF/&L!M&L1L%&N&090
OPLO:<590!N
FLC09;J%!_&[:yB<d[X&z
QROL{ghij
QRRL]O|hij
><9?P
><<F}is~gg}V
[QR?P[?RLPw
[i$nPPtogg~g•~}qVQqVLL:
iPip
gg~}V~}qggQ•s:Pip
g]S\toF
gS\WX•Vq:g•
QRRL]O
;^^9U€|€H0;T&a•BC1]‚
50]ƒX;T&Z&1:>0‚&!€|€H
a•BC]X!N;T&:>,3(&HB5!"
4]L:904!N:p: 90!N
:p
QRRL]O:phij
QRRL]R:pO|hij
><9?P
><<F}is~gg}V
[QR?P[?RLPwR:Pip
[i$nPPtogg~}V~}qggQ•sL:
„•rs„o
gg~}V~}qggQ•s„•rs„o
pqgP
gg~}V~}qggQ•spqgP
[Pu$vPu
gg~}V~}qggQ•s[Pu$vPu
o>#
&z:HL1;&::mm 04
&Z&5@5a0054&:>05%
B&<a5T9UF ?B&ZZ&„rv0
&!NQRR:G8Z&
05:>AN:3<K&F0F:,K
5H0hj<ŠF::8h|j:
kkkkkkkkkkkkkkkkkkk
&T(&d-&F3JFB‹0;<0<
5B90<],HB5!"1Z&]
&7525!"J:y52aZ&]BŒ<D&:
K1%90F3(&5!"B&ZJ!N
QR?P[?RLL[RR]Rr:!N
0EZ&<1]8XXLLX&7
525!"J90&CZ&!N5aE1]5Z:
4]5@F;08:XE0F41:>,9=
3<F%&<TF35!"0;<5,K8Z&]
&!N0:
kkkkkk
g:L]
^$i†•„rri•„irRRR?R<>
RLLR?LRrwv^
q:r<
$i†•„rri•„irRRR?R<>
Ri8LRr[
•:<<
$i†•„rri•„irRRR?R<>
Ri8LRr<r„
s:
556J.9+,5Q(((;7V<59%&76%ALC'()
""GW;..9"O75;7;"$"A?1)
$%X6%A@-C'()""JB%.Y56%AC"D;=J5
6%&@-6%A'()C'()""J85;;"$ZB7[6%7\5
]P(\5]P(;L"^5;._NL^C$L.6%A
CJB6%A;Z$"57"K5L5;7$$L5"$L;Z%&
755;`\
&&'()!"!""D"@C6.9:`.9";&@-$a5$J
$VL`'()""D";_5Z^5[9`7'()
!""@%M@Z9b57Fb5":"A$Va5L
$L'()
c@CV3=#* +*,&&-&.**,/0c@C;8$6UV
L`8.d@-`/6$`D;=`^d
@-`@.@5@-5J=9.95001!8$.
9@C5W;
e:5"J:(""5J:,+-#J:* +*,&&2001!4
D"* +*,&&&#J"6=""a5$J:1#* +
*,&&!56:@O"=.V6LW;9535
f!5.001!g5"Z6N7D"V;$=:,2 ##&3
-6)I8@CW;
hijH Hh5fK5klfelmfKekfeKkmk 555
c$Q3%,B]Y"=g5"C6$FVg5"JA^
:49FV5001!
l!56FV5001!$VL"5""J$]:n
$%_56U+,, #5-67.!"/-8.7"O$6
:,;J.ZL"K5$:*7:]#55
QoL?D(((D(@-b;";L+J001!Z6U";L%.6U
L5Q"=J.p=+,,2 ##&3 -X001!qV
8$ZF;@F8@CW;
$:,€K55"5xy(Jx)!J5P)!5"K"5S
JOW;$=:)P5">$a5'()""J866%AC$'()a5
$J.VL*"^$?1)J=$L:)P5"a5001!""8)P
5";Z\"FU3xy(Jx)!P)!
rs55hijH Hhf5fmk Hkm KjjHK jjkmk
555I86•X93%,Vz""
@8@CW;
rs55hijH HhlKl‚Kemfj5m lfemHlKf
kmk 555ƒD"V001!J$"
6("J:(""3@8@CW;
rs555 kmkhijH HhkjlKmjefKm
Hek fKjj kmk 555V("(""3@
8@CW;:'()"K5$A5J|,@$A55Q((D(
9.9$6%AC$'()J5Q((D(@NANLFJ=$
=qV*5Q;*:1)u"2((D(45.F,
z"@8@CW;
D"Vz"1)u"2((D(4@8@CJ$=:,05
32;49.9$6%AC'()""u,x5S5"3
3254#001!""@-#6O$`F&
6%A%G5S5"")%$ABL55;SS55;'()
3J8$=:,;J@%$]A#&6%AGU
|$.95@,;D"7("K"J&\5]P(a5
'()"""K5@8@C
rs555 kmk5Kl HhijH HhHe
lKem eHHk5 KmfH lK5kmk 5555=
"M@-^;Va5$J"8.„76Lekfj"J=%
$.VNA@-".8$LV=7'()""
6•X)%$:|NA"`\8$Z`{L@8@CW;J@
6U5$Q6n!5.61;"V("(""3
c@CA^#";&b501(;:@,01
0"'9)M3%'!%&8,
KN!)O%:%:-<!*.)P.
Q0)(-EK!0(!%>'*%
!#R%>/6 )'.S%H
D3! 09'!'I#8,
K.)T
TUVQ0 W'!.!W.)
SS6"e "5K";""SS
ŠSŠSŠSŠSŠSŠ
Šy3
Š!""u"‹SPP!l
Œ •X…•D6"5
Œ •X…•D6"b
Œ •Xy•1xh3hK
Œ •Xy•1xh3h
Œ •Xy•1xh3hI
c$.9F;6"5Ž&$&3.B;93"=APP!l;
D&BA6.`a57:P!1(P^-zb526"56"b
6%bL]zL9]"5"*"";5ŽQ"bz@NB4
)@5Ž.O"=JW;LFa56"J.69"5B.`a5z=b5%L
&5Ž%A@V%…P5"••{V••
!Q$a56"*OUŽ6Lo=Ž:"5555a5.JQ
o;@-UL"z6"I^%.B5:"556U
bQ$J.]@-Bb56;NO.1""5;!5
u71""5;5a5@,969"5B.`a57zu75""5;@-:
••"••5‰@,2D@,Aa54J"JSJ5Ž.
F"_A@5
ABC&5C&9CC#5
1""5;.9^_5%•5""5;h5OFQW""55_.
9@-‰59]"Ž"5F"_@,7I7]*7>
•5";K"5J5""""K5
IIuŠ…•D
II"ŠyDD(e
IIŠe
•
•5""5;
•˜˜˜˜˜˜˜˜˜
5""5;€Š"J5J5JJSJ5Jh3hJ
""J""J""
•
•5
•˜˜˜˜˜˜˜˜˜˜
"6K"5"53PP!€”!;D"5"5
"D5"5;"5€K "
524•€ƒƒ— —5K;fIEŒ"
'W;@Ž=Ž"5%$$;$;
ƒ6"S3S
SS6"e "5K";••""••ƒ""SS
ŠSŠSŠSŠSŠSŠ
Šy••3••ƒ3
Š!""u"‹SPP!l
6K"5"53PP!€”!;D"5"5
D5"5;"5€K "
Œ •X…— —5K;fIEŒ"
)%""6U\|UŽJ$ŽF;yDD("L6%bL@NB5
˜ •i)”
˜ f1”"
u76Lo6a56".$;@7…PJNL]„=(";
6"`@,S"=""
DLu5
9=5a%&B_&_X0C8<B5AT5409;5I<aXAT
54Œ<5.!M&E&9UC&_&590!3585490XU51T
E3L:v0!3,<8<B57<8&X53E,
5.H9bŒ<5357<090H09;&0%&B_&_Œ<5.Z
:;T58041;!M&5TŒ<D&5T9U15.E&_•
=L5••15I<aY!M&5T=:5T9U1[[<&!M&!;
,;T58%&YZ9,T5415I<aK15.E&05G0
9;Xa&&F/&9UT54Œ<5.X90!3TE1K
‚&4(0@KH5!"51KN<90!3(0;T58kg
-&0T!<B
Ž&!_&"L0K95.
[.KBLBLa%&3L0!5.!&<&9l9I@
bA900Z;<:!9=<;5T%&KN&41Œ<151&:%&
!_&6KBLBL5.&1b&"L<Q
~$%&w5!"5.E&Q B0b&"LFdF<4FJ96!5GF33<4[[
%&5!",%&a5!"90!3,%&acN&5!":$%&
5!"a&@L1,&<
~ŽŽ‘i‘1F170-
~ŽŽ905!"!&DN57<K5aL[‘!M&,`
08<’5ag%&X(0‚D@&,,-&F•1
~$%&5!"X(Q|,a=5!"42<%&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