แก้ปัญหากรณีที่ไม่สามารถเพิ่ม custom template ที่สร้างขึ้นมาใน Certificate Templates ได้


ในกรณีประสงค์ที่จะสร้าง self-signed certificate เพื่อใช้งานบน Windows Server สำหรับบริการต่าง ๆ เช่น Remote Desktop Connection หรือโพรโทคอล LDAPS โดยทั่วไปแล้วจะใช้วิธีเปิดใช้งาน role “Active Directory Certificate Services” เพื่อสร้าง root certificate และใช้ root certificate ออก certificate สำหรับบริการนั้น ๆ โดยมักจะใช้ custom template เพื่อให้สะดวกต่อการออก certificate ที่ตรงความต้องการ

ปัญหา

ในกรณีปกติ เมื่อสร้าง custom template ผ่านโปรแกรม Certificate Templates Console (certtmpl.msc) แล้ว จะต้องเพิ่ม template นั้นในแฟ้ม Certificate Templates ของโปรแกรม Certification Authority (certsrv.msc) โดยคลิกขวาที่แฟ้มแล้วเลือก New > Certificate Template To Issue เพื่อเลือก custom template ที่จะเพิ่มในแฟ้ม

อย่างไรก็ตาม มีกรณีที่ custom template ไม่ปรากฏในหน้าสำหรับเลือก custom template ทำให้ไม่สามารถใช้เมนู New > Certificate Template To Issue เพื่อเพิ่ม custom template ในแฟ้ม Certificate Templates ได้

วิธีแก้ไขปัญหา

สามารถเพิ่ม custom template ในแฟ้ม Certificate Templates โดยเปิดโปรแกรม cmd แล้วใช้คำสั่งด้านล่างแทน (แทนที่ YourTemplateName ด้วย Template name ไม่ใช่ Template display name)

certutil -setCAtemplates +"YourTemplateName"

จากนั้นเลือกเมนู Action > Refresh ในหน้า Certification Authority หากพบ custom template ในแฟ้ม Certificate Templates แล้ว สามารถแสดงว่าเพิ่มสำเร็จ สามารถใช้ template นั้นในการออกใบรับรองได้

แสดงความเห็น

อีเมลของคุณจะไม่แสดงให้คนอื่นเห็น ช่องข้อมูลจำเป็นถูกทำเครื่องหมาย *