ผมสังเกตุ user ของผมไม่สามารถใช่ sudo ได้ครับ โดยผมสังเกตุจาก
[aaa@203-144-225-42 ~]$ sudo yum update
[sudo] password for anaro:
aaa is not in the sudoers file. This incident will be reported
หรือจะ ลอง
[aaa@203-144-225-42 ~]$ sudo shutdown -r 0
[sudo] password for anaro:
aaa is not in the sudoers file. This incident will be reported.
ก็จะเป็นเหมือนกัน ผมต้องแก้ปัญหาอย่างไงเหรอครับ
ขอบคุณมากครับ
google ผลลัพธ์ 1 2 3 อันไหนก็ได้ จิ้มเลยครับ
http://goo.gl/nJcQC
[root@203-144-225-42 anaro]# sudo gedit /etc/sudoers
เพิ่ม
%sudo ALL=(ALL) ALL
มานไม่ยอมให้ผม save อะครับ
ได้แล้วครับ ต้องแก้ไขให้เขียน file ได้ก่อน โดยการใช่
[aaa@203-144-225-42 etc]$ sudo chmod 777 sudoers
แล้วเพิ่ม
aaa ALL=(ALL) ALL
แล้วตามด้วย
[aaa@203-144-225-42 etc]$ sudo chmod 440 sudoers
ที่มา linuxlane.com
icez
5
เอ่อ อย่า chmod file นั้นเป็น 777 นะครับ เพื่อนเจาะเครื่องสบายๆเลย
หลังจากที่แก้ 777 แล้วกลับมา 440 ครับไม่รุ้ ok ไหมครับ
kke
9
ถ้า sudo chmod ไฟล์ sudoer ได้ ก็แปลว่า user นั้น sudo ได้อยู่แล้ว แต่อาจจะไม่ได้อนุญาตทุกอย่าง
จริงๆปกติมันน่าจะ sudo su - ได้ จากนั้นจะทำอะไรก็ทำได้หมดเพราะเป็น root แล้ว