security so I don't get I script that say sudo -rf or..... I guess I don't really need to worry about that, huh?On Tue, Jul 9, 2024 at 1:33 PM Snyder, Alexander J <alexander@snyderfamily.co> wrote:Why?What's the end goal? What are you trying to achieve?--
Thanks,
Alexander
Sent from my Google Pixel 7 ProOn Tue, Jul 9, 2024, 10:17 Michael <bmike1@gmail.com> wrote:Good question! I want to disable sudo while allowing its alias to workOn Tue, Jul 9, 2024 at 12:29 PM Snyder, Alexander J <alexander@snyderfamily.co> wrote:I think I lost the thread of this discussion somewhere along the way. What is your desired outcome with this, Michael?Regardless of the journey, what are you hoping to achieve in the end?--
Thanks,
Alexander
Sent from my Google Pixel 7 ProOn Tue, Jul 9, 2024, 09:09 Michael via PLUG-discuss <plug-discuss@lists.phxlinux.org> wrote:and I reinstalled my system and got sudo and my alias to work. ai told me to change the permissions of sudo but..... wait I could create an instance of sudo closer up the path and change it's permissions. that should work.On Tue, Jul 9, 2024 at 12:05 PM Michael <bmike1@gmail.com> wrote:I'm not antisystemd but that is how ai told me to do itOn Tue, Jul 9, 2024 at 10:28 AM Ryan Petris <ryan@petris.net> wrote:I don't have an answer for you on the sudo bit, but I saw this in your history:5 nano ~/set_time_after_internet.sh6 chmod +x ~/set_time_after_internet.shNot sure if you're anti-systemd or not, but if you use systemd-networkd (or even NetworkManager) along with systemd-timesyncd, this is exactly what happens, the time is set after you get an internet connection.At least on Arch, enabling systemd-networkd or NetworkManager will result in the services systemd-networkd-wait-online or NetworkManager-wait-online being enabled, which will complete once you have an internet connection; systemd-timesyncd will run after these services and thus the time will be set.Yet another thing you don't have to worry about if you just embrace systemd...On Tue, Jul 9, 2024, at 6:23 AM, Michael via PLUG-discuss wrote:here is my history so you can see what chatgpt directed me to do:bmike1@bmike1-desktop:~$ history1 xkill2 ls /home3 ls /home/bmike1/b4 ls /home/bmike1/5 nano ~/set_time_after_internet.sh6 chmod +x ~/set_time_after_internet.sh7 crontab -e8 alias aliasforsudo to sudo9 nano ~/.bashrc10 source ~/.bashrc11 aliasforsudo ls /root12 nano ~/.bashrc13 source ~/.bashrc14 aliasforsudo ls /root15 source ~/.bashrc16 aliasforsudo ls /root17 sudo visudo18 nano ~/set_time_after_internet.sh19 chmod +x ~/set_time_after_internet.sh20 crontab -e21 aliasforsudo ls /root22 SUDO23 sudo24 sudo cp /usr/bin/sudo /usr/bin/sudo.bak25 sudo tee /usr/bin/sudo <<EOF26 #!/bin/bash27 echo "The sudo command has been disabled."28 EOF29 sudo mv /usr/bin/sudo /usr/bin/sudo.bak30 echo -e '#!/bin/bash\necho "The sudo command has been disabled."' | sudo tee /usr/bin/sudo31 aliasforsudo ls32 sudo ls33 # Create the dummy sudo script34 echo -e '#!/bin/bash\necho "The sudo command has been disabled."' | sudo tee /usr/bin/sudo35 which sudo36 sudo37 su38 aliasforsudo39 aliasforsudo40 aliasforsudo41 sudo42 isud43 visudo44 aliasforsudo visudo45 aliasforsudo46 aliasforsudo ls47 sudo ls48 aliasforsudo ls49 sudo ls50 echo -e '#!/bin/bash\necho "The sudo command has been disabled."' | sudo tee /usr/bin/sudo51 aliasforsudo mv /usr/bin/sudo /usr/bin/sudo.old52 echo -e '#!/bin/bash\necho "The sudo command has been disabled."' | aliasforsudo tee /usr/bin/sudo53 aliasforsudo bash -c 'cat > /usr/bin/sudo <<EOF54 #!/bin/bash55 echo "The sudo command has been disabled."56 EOF'57 echo -e '#!/bin/bash\necho "The sudo command has been disabled."' > sudo58 aliasforsudo mv sudo /usr/bin/sudo59 aliasforsudo ls60 su61 aliasforsudo ls62 sudo ls63 aliasforsudo passwd root64 su65 aliasforsudo sudo66 aliasforsudo ls67 sudo ls68 aliasforsudo visudo69 historybmike1@bmike1-desktop:~$switced user because sudo disabledroot@bmike1-desktop:/home/bmike1# history1 mount -oremount,rw /2 cp /usr/bin/sudo.bak /usr/bin/sudo3 chmod 4755 /usr/bin/sudo4 visudo5 mount -o remount,rw /6 cp /usr/bin/sudo.bak /usr/bin/sudo7 chmod 4755 /usr/bin/sudo8 su cmike19 su bmike110 sudo rm /usr/local/bin/sudo11 sudo rm /usr/local/bin/sudo_custom12 rm /usr/local/bin/sudo_custom13 nano ~/.bashrc14 which sudo15 rm /usr/local/bin/sudo16 which sudo17 sudo ls18 rm /usr/local/bin/sudo19 which sudo20 ls -l /usr/bin/sudo21 nano ~/.bashrc22 rm /usr/local/bin/sudo23 which sudo24 apt update25 apt install --reinstall sudo26 sudo ls27 apt update28 apt install --reinstall sudo29 which sudo30 sudo ls31 rm /usr/local/bin/sudo 2>/dev/null32 ls -l /usr/bin/sudo33 sudo ls34 visudo35 echo $PATH36 unalias sudo 2>/dev/null37 sudo38 chmod 4755 /usr/bin/sudo39 sudo40 echo "alias god='sudo'" >> ~/.bashrc41 source ~/.bashrc42 aliasforsudo ls43 tail -f /var/log/syslog44 apt --fix-broken install45 fg46 historyroot@bmike1-desktop:/home/bmike1# su bmike1On Tue, Jul 9, 2024 at 7:46 AM Michael <bmike1@gmail.com> wrote:chatgpt is being stupid. A couple of days ago it showed me how to create an alias for sudo and then disable sudo while letting the alias work. Well, I had a power fluctuation and that caused my box to to start booting into busybox. So I reinstalled my system and now chatgpt doesn't know how to disable sudo while allowing it's alias to work. So I turn to you.--:-)~MIKE~(-:--:-)~MIKE~(-:---------------------------------------------------PLUG-discuss mailing list: PLUG-discuss@lists.phxlinux.orgTo subscribe, unsubscribe, or to change your mail settings:--:-)~MIKE~(-:-----------------------------------------------------:-)~MIKE~(-:
PLUG-discuss mailing list: PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
--:-)~MIKE~(-:--:-)~MIKE~(-: