¾Æ·¡¿¡¼ ¿©·¯ºÐÀº ´ÙÁß »ç¿ëÀÚ °èÁ¤À» Ãß°¡ÇÏ´Â °£´ÜÇÑ ¹æ¹ýÀ» Á¦°øÇÏ´Â ¹èÄ¡ÆÄÀÏÀ» ¹ß°ßÇÒ °ÍÀÌ´Ù. ÀÌ ¹èÄ¡ÆÄÀÏÀº ºñÇ¥ÁØ ¸í·É¸¦ ÀüÇô »ç¿ëÇÏÁö¾Ê¾Ò´Ù. ÇÊÀÚ´Â °³ÀÎÀûÀ¸·Î »õ·Î¿î »ç¿ëÀÚ¸¦
±×·ì¿¡ ÇÒ´çÇÏ°í °øÀ¯±ÇÇÑÀ» ¼³Á¤ÇÏ´Â ¸®¼Ò½º Ŷ À¯Æ¿¸®Æ¼¸¦ »ç¿ëÇÏÁö¸¸ ºÀÇÕµÈ ¹èÄ¡¹ÙÀÏ·Î ÀÌ·¯ÇÑ ¸ðµç °ÍÀ» ÇÒ ¼ö ÀÖ´Ù(net group ¸í·ÉÀ» Ãß°¡ÇÒ ¼ö ÀÖ´Ù. - %systemroot%\System32\ntcmds.hlpÀ» ºÁ¶ó)
¿ë·Ê: À̾îÁö´Â ¿¹¿¡´ëÇØ ¾à 50°³ Ç׸ñÀÇ ¹èÄ¡ÆÄÀÏÀ» ¸¸µç´Ù.
echo **c:\users\JSIAddErrors.log
call JSIAddUser User1 User1Password "Remarks" "User1 Full Name" HomeServer
call JSIAddUser User2 User2Password "Remarks" "User2 Full Name" HomeServer
exit
¿ä±¸»çÇ×:
- ¹èÄ¡ÆÄÀÏÀº HomeServer¿¡¼ ±âµ¿µÇ¾î¾ß ÇÑ´Ù.
- »ç¿ëÀÚÀÇ È¨ µð·ºÅ丮´Â HomeServerÀÇ C:\USERS\UserName³»¿¡ ¼ûÀº °øÀ¯·Î¼ »ý¼ºµÈ´Ù.
·Î±×ÀÎ ½ºÅ©¸³Æ®´Â net use Drive: /home¸¦ È£ÃâÇÑ´Ù.
- C:\USERS¿¡ ´ëÇÑ »ç¿ë±ÇÇÑÀº Administrators¿Í
Backup Operators¿¡´ëÇؼ¸¸ ¼³Á¤µÈ´Ù.
- C:\USERS\default¿¡¼ °øÅë ÆÄÀÏÀº »ç¿ëÀÚÀÇ È¨µð·ºÅ丮·Î º¹»çµÈ´Ù.
- ¿À·ù´Â C:\USERS\JSIAddErrors.log ÆÄÀÏ¿¡ ±â·ÏµÈ´Ù.
JSIAddUser.cmd
REM JSIAddUser.cmd
REM Usage: Call JSIAddUser UserName Password "Remarks" "FullName" HomeServer
if "%5" == "" goto parms
if exist c:\users\%1 goto dup
md c:\users\%1 nul
net user %1 %2 /ADD /comment:%3 /fullname:%4 /homedir:\\%5\%1$ nul
if errorlevel 1 goto dup
net share %1$=c:\users\%1 /Ynul
CACLS c:\users\%1 /G %1:F /T /E nul
xcopy c:\users\default\*.* c:\users\%1\ /s /enul
goto fin
:dup
Echo %1 and/or c:\users\%1 pre-existing. c:\users\JSIAddErrors.log
goto fin
:parms
Echo number of parameters for %1. c:\users\JSIAddErrors.log
:fin
exit
NTNUMÀº ´ÙÀ½°ú °°Àº °ÍÀ» ÇÒ ¼ö ÀÖ´Â °ø°³ ÇÁ·Î±×·¥ÀÌ´Ù.
- ÅؽºÆ® ÆÄÀÏ·Î ºÎÅÍ »ç¿ëÀÚ¸¦ »ý¼ºÇÑ´Ù.
- °¢ »ç¿ëÀÚ¿¡´ëÇÑ È¨ µð·ºÅ丮¸¦ »ý¼ºÇÑ´Ù.
- °¢ »ç¿ëÀÚ¸¦ ·ÎÄ®/Àü¿ª ±×·ìÀÇ ±¸¼º¿øÀ¸·Î ¸¸µç´Ù.
- »ç¿ëÀÚ ÆÄÀÏÀ» »ý¼ºÇÑ´Ù.
- »ç¿ëÀÚ Á¤º¸¸¦ ¼¹ö·Î ºÎÅÍ ÅؽºÆ® ÆÄÀÏ·Î ´ýÇÁÇÑ´Ù.