Lädt...

🐧 Since i broke my "sudo" (by doing what ChatGPT told me), i'm also going to show you the fix ChatGPT told me. This might be helpful for others.


Nachrichtenbereich: 🐧 Linux Tipps
🔗 Quelle: reddit.com

Yes, this happened... Wtf?! Here is a warning, don't trust everything ChatGPT says to you...

Also, i looked on the search and i have not found an alike topic in this sub. So i though i should share for other people that ran into the same problem. Not sure if this is the right sub for it, but i think so, because this is not a question.

So, what happened is that i was messing up with my system while being guided by ChatGPT and i think one of the packages i installed messed up with "sudoers". I lost my access to "sudo". So asked ChatGPT how to fix it and it is now fixed, here is the ChatGPT answer:

I apologize for the confusion. If you are unable to use sudo and your user is not in the sudoers file, you will need to boot your Arch Linux system into single-user mode and then modify the /etc/sudoers file to add your user to the sudoers list.

Here are the steps to follow:

Boot your system into single-user mode by rebooting the system and pressing the e key when you see the GRUB bootloader menu.

Find the line that starts with linux, and add init=/bin/bash to the end of the line.

Press Ctrl+X or F10 to boot into single-user mode.

Once you are in single-user mode, remount the root filesystem with read-write permissions by running the following command:

mount -o remount,rw /

Now you can modify the /etc/sudoers file using your preferred text editor. For example:

nano /etc/sudoers

Find the line that says %wheel ALL=(ALL) ALL, and uncomment it by removing the # character at the beginning of the line.

Save and exit the file.

Exit the single-user mode by running the following command:

exec /sbin/init

Once your system has booted normally, add your user to the wheel group by running the following command:

sudo usermod -aG wheel yourusername

Log out and log back in for the changes to take effect.

After completing these steps, your user should be able to use sudo again.

submitted by /u/Malokeradio
[link] [comments] ...

🐧 Run "sudo ls", but not "sudo ls -l" (or any other option/argument)


📈 39.46 Punkte
🐧 Linux Tipps

🐧 TIL that you can re-run a previous command with sudo using "sudo !!'


📈 31.28 Punkte
🐧 Linux Tipps

🐧 Why "sudo" when you can just "su"?


📈 30.86 Punkte
🐧 Linux Tipps

🐧 What is the point of Sudo, I mean if you're signed in why do you have to enter Sudo?


📈 30.83 Punkte
🐧 Linux Tipps

🎥 Agility Broke AppSec. Now It's Going to Fix It - Chen Gour Arie - ASW #207


📈 29.87 Punkte
🎥 IT Security Video

📰 Agility Broke AppSec. Now It's Going to Fix It.


📈 29.87 Punkte
📰 IT Security Nachrichten

🔧 KISS Principle: Giữ Mọi Thứ Đơn Giản Nhất Có Thể


📈 29.79 Punkte
🔧 Programmierung

🔧 Có thể bạn chưa biết (Phần 1)


📈 29.79 Punkte
🔧 Programmierung

🔧 Grok 3: AI Thông Minh Nhất Thế Giới


📈 29.79 Punkte
🔧 Programmierung

🕵️ Kèo Thẻ Phạt Vip66 Là Gì? 3 Lối Đánh Kèo Chậm Mà Chắc


📈 29.79 Punkte
🕵️ Reverse Engineering

📰 Do you have remote workers? This remote work security guide might be helpful.


📈 29.59 Punkte
📰 IT Security Nachrichten

🎥 Doing it the quick/easy/helpful/smart way with Google Docs. 😏 #Shorts


📈 29.24 Punkte
🎥 Video | Youtube

🔧 Setting up simple React components (also helpful for interviews)


📈 27.64 Punkte
🔧 Programmierung

🐧 Jobs fail in /etc/crontab but execute in "sudo contrab -e" and "crontab -e"


📈 27.45 Punkte
🐧 Linux Tipps

🐧 Jobs fail in /etc/crontab but execute in "sudo contrab -e" and "crontab -e"


📈 27.45 Punkte
🐧 Linux Tipps