Tag: recovery

แก้ปัญหาใช้คำสั่ง sudo ไม่ได้บน ubuntu

จะทำอย่างไรเมื่อคุณเผลอไปเปลี่ยน group ของ user ปัจจุบันของคุณ ตัวอย่างผมเผลอไปสั่ง

root@mrgill-laptop:~# usermod -G vboxusers mrgill

นั้นก็มีความหมายเหมือน usermod -g vboxusers mrgill เลยครับเพียง แค่ผมลืมใส่ -a เข้าไป ทำให้เกิดปัญหาเลย ปัญหาคือมันทำให้ผมหลุดออกจาก group ที่เป็น admin ทำให้ผมสั่ง sudo ไม่ได้

mrgill@mrgill-laptop:~$ sudo -s [sudo] password for mrgill: mrgill is not in the sudoers file. This incident will be reported. mrgill@mrgill-laptop:~$

วิธีแก้ก็ต้องเข้าไปใน recovery mode แล้วเข้าไปแก้ในไฟล์ /etc/group ครับ หรือจะใช้คำสั่งด้านล้างก็ได้

root@mrgill-laptop:~# usermod -G adm,admin -a mrgill

ขั้นต้นแค่ add user ของคุณให้อยู่ใน group adm กับ admin ก็พอครับ แล้วค่อยมา add group อื่นๆ ตามในหน้า gnome ก็ได้
ผลที่ได้คือ

mrgill@mrgill-laptop:~$ sudo -s [sudo] password for mrgill: root@mrgill-laptop:~#

แล้วก็มา add group อื่นๆ ตามเข้าไป

root@mrgill-laptop:~# usermod -G adm,admin,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lpadmin -a mrgill

หวังว่าคงมีประโยชน์กับผู้อ่าน

Leave a Comment November 10, 2009

จะเข้า Recovery Mode บน Ubuntu 9.10 Karmic Koala ยังไง

สวัสดีตอนเช้าครับ ฮาๆ ยังไม่ได้นอนเลย เมื่อคืนนั่งลง Ubuntu Server ให้เพื่อนทั้งคืนจนถึงเช้า นั่งทำให้ Ubuntu Server หน้าตาเหมือน Ubuntu Desktop วิธีการก็ง่ายๆ ครับ

$ sudo apt-get install ubuntu-desktop

ก็ลงไว้ให้เพื่อนมันใช้งานง่ายๆ ครับ ลงไปลงมามีปัญหาจำเป็นต้องเข้า Recovery Mode เอ๊ะแต่เจ้า 9.10 นี่มันเข้า Boot Menu ของ Grub2 ยังไงหวา ปกติมันวิ่งๆ แล้วก็เข้าหน้า login เลย กด Esc เหมือน 9.04 แล้วก็ยังเข้าไม่ได้ ก็ลอง Search ใน Google ดูก็พบคำตอบครับคือต้องกด Shift ค้างไว้ตอน Boot มันก็จะแสดงหน้าเมนูของ Grub2 มาให้เลือกนั้นเอง

Leave a Comment November 9, 2009


Recent Entries

Random Posts

Social Network

Tag Cloud

Calendar

March 2010
S M T W T F S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  

RSSTwitter: imrgill

RSS LinuxDotSothorn

RSS UbuntuClub

RSS Blognone

Tag

ภาษาไทย 2009 adobe amsn antivirus apt-get bash chat clip dns entertainment Facebook firefox Forward mail free google graphic grave accent How to howto im install Internet karmic keyboard Linux logout monitoring operating system os Programming recovery script Server shell script sms Social network Software themes troubleshooting twitter Ubuntu utility virtualization Windows

Categories

Archives

Blogroll

Meta

 

You need to log in to vote

The blog owner requires users to be logged in to be able to vote for this post.

Alternatively, if you do not have an account yet you can create one here.

Powered by Vote It Up

Get Adobe Flash playerPlugin by wpburn.com wordpress themes