คำสั่ง net เพิ่ม,ลบ user บน Windows XP

Filed under: Users, Windows — Tags: , — editor @ 3:51 pm


อาจเนื่องมาจากคุ้นเคยกับการใช้คำสั่ง command line บนลีนุกซ์ หรือ UNIX เพื่อแก้ไขคอนฟิกต่างๆ ของเครื่องเป็นเวลานาน เมื่อต้องมาทำบน Windows เช่นครั้งนี้ได้รับมอบหมายงานให้เพิ่ม local user จำนวนมากบนเครื่อง Windows XP หลายๆ เครื่อง แต่ห้ามคอนฟิกเป็น domain controller จึงหาวิธีการทำโดยใช้การรันคำสั่ง command line บน Windows

จากการค้นหาบน google มีอยู่หลากหลายวิธีที่จะเพิ่ม local user ได้ ทั้งการเขียนโปรแกรม สร้าง WSH (Windows Script Host) หรือล่าสุดที่ทาง Microsoft นำเสนอทางเลือกใหม่คือ Windows PowerShell

แต่ดูแล้วค่อนข้างจะยุ่งยาก บางอย่างเช่น Windows PowerShell ต้องมีการติดตั้งโปรแกรมใหม่ ซึ่งทางลูกค้าไม่ต้องการให้เป็นเช่นนั้น

สุดท้ายมาลงเอยโดยใช้คำสั่ง net ซึ่งมีติดตั้งมาอยู่แล้วกับ Windows XP ทางผู้เขียนเพิ่งทราบเหมือนกันว่า สามารถใช้คำสั่งนี้ เพิ่มลบ user ได้ รวมทั้งสามารถคอนฟิกอื่นๆ ได้อีกด้วย

วิธีการรันคำสั่ง net

ล็อกอินเป็น Administrator หรือมีสิทธิเทียบเท่า เพื่อแก้ไข user account ได้

เพื่อความสะดวกในการทดลอง แนะนำให้เปิด command line ของ Windows ก่อน โดยสามารถรันได้จากคลิ้ก Start -> Run พิมพ์คำว่า cmd ในช่อง Open แล้วกดปุ่ม [OK}















พิมพ์คำสั่ง net หน้าจอจะแสดง syntax ในการรันคำสั่งต่างๆ ซึ่งแยกตามหมวดต่างๆ

C:\Documents and Settings\Administrator> net
The syntax of this command is:


NET [ ACCOUNTS COMPUTER CONFIG CONTINUE FILE GROUP HELP
        HELPMSG LOCALGROUP NAME PAUSE PRINT SEND SESSION
        SHARE START STATISTICS STOP TIME USE USER VIEW ]


ในที่นี้เราจะจัดการเกี่ยวกับ user สามารถพิมพ์คำสั่ง net user "/?" เพื่อแสดงวิธีการใช้คำสั่งเกี่ยวกับ user

C:\Documents and Settings\Administrator> net user /?
The syntax of this command is:

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


หากต้องการรายละเอียดมากขึ้นเกี่ยวกับการใช้คำสั่ง ให้พิมพ์ต่อท้ายด้วย "/help"

C:\Documents and Settings\Administrator> net user /help
The syntax of this command is:NET USER

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

NET USER creates and modifies user accounts on computers. When used without switches, it lists the user accounts for the computer. The user account information is stored in the user accounts database.

This command works only on servers.

username Is the name of the user account to add, delete, modify,
              or view. The name of the user account can have as many
              as 20 characters.
password Assigns or changes a password for the user's account.
              A password must satisfy the minimum length set with the
              /MINPWLEN option of the NET ACCOUNTS command. It can
              have as many as 14 characters.
*            Produces a prompt for the password. The password is not
              displayed when you type it at a password prompt.
              /DOMAIN Performs the operation on a domain controller of
              the current domain.
/ADD       Adds a user account to the user accounts database.
/DELETE   Removes a user account from the user accounts database...


ITS: แจ้งเตือนไวรัส Firefox Add-on Spies on Google Search Results‏

เตือน!!!พบสปายแวร์"ปลั๊กอิน"ไฟร์ฟอกซ์

มีการพบ"สปายแวร์"ที่แฝงมาในรูปของโปรแกรมเสริมการทำงาน (Add-On) ที่สามารถติดตั้งเข้าไปใน Firefox ได้

ผู้เชี่ยวชาญระบบรักษาความปลอดภัยจากบริษัทเทรนด์ไมโคร (Trend Micro) เตือนผู้ใช้บราวเซอร์ Firefox ทั่วโลกให้ระวังสปายแวร์ที่ถูกสร้างขึ้นมาในรูปของโปรแกรมเสริมการทำงานสำหรับ Firefox โดยเมื่อติดตั้งเข้าไปแล้ว มันจะสามารถสะกดรอยตามกิจกรรมการค้นหา (Search) ข้อมูลของเหยื่อได้

สำหรับจุดเริ่มต้นของสปายแวร์ มันจะทำตัวเป็นอัพเดตของ Adobe Flash Player และเมื่อถูกสั่งรันบนคอมพิวเตอร์ของผู้ใช้ มันก็จะแสดงตัวเป็น add-on ของ Firefox โดยระบุชื่อเป็น "Adobe Flash Player 0.2" ทั้งนี้ มันสามารถสอดส่องกิจกรรมการท่องเว็บของผู้ใช้ โดยเฉพาะการค้นหาข้อมูลด้วย Google ด้วยบราวเซอร์ Firefox จากนั้นมันจะส่งข้อมูลที่รวบรวมได้ไปยัง http://{BLOCKED}jupdate.com นอกจากจะสะกดรอยตาม พร้อมแอบส่งข้อมูลแล้ว add-on สปายแวร์ตัวนี้ยังสามารถแทรกโฆษณาเข้าไปในหน้าผลลัพธ์การค้นหาของ Google ได้อีกด้วย โดยก่อนหน้านี้เป้าหมายของมันคือ Internet Explorer ซึ่งเป็นเหตุผลที่ทำให้ผู้ใช้หลายคนเปลี่ยนไปใช้บราวเซอร์ตัวอื่น อย่างเช่น Firefox, Chrome และ Safari แม้ Firefox จะได้ชื่อว่าเป็นแพลตฟอร์มที่ปลอดภัยมาก่อน แต่นับจากนี้อาจจะไม่ใช่อีกต่อไปแล้ว เนื่องจากมัลแวร์กำลังตั้งเป้าโจมตีบราวเซอร์ทีมีชื่อเสียงตัวอื่นแทน นั่นก็คือ Firefox นั่นเอง
ผู้ใช้ควรระวังการดาวน์โหลดอัพเดทจากแหล่งที่ไม่รู้จัก

แหล่งข้อมูลอ้างอิง:
Firefox Add-on Spies on Google Search Results

Microsoft Fix it Solution Center

Microsoft Fix it Solution Center: "Microsoft Fix it Solution Center"