Announcement

Collapse
No announcement yet.

The dumb stuff I did today and how I fixed it...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The dumb stuff I did today and how I fixed it...

    My idea for this thread came today when I borked myself on my server. We can confess dumbs&!t things we did and how we solved them!

    Wait...

    ...I'll start

    I access my headless server remotely through ssh, which means I do almost everything using the command line. I needed to add my one-and-only user on this server to the lpadmin group, so I blithely typed this:

    sudo usermod -G lpadmin smith

    and then I closed the terminal and terminated the ssh connection. Voilà! I torpedoed my sole user out of every other group on the machine and made lpadmin my primary group...

    ...great, just great. What I wanted to type was:

    sudo usermod -a -G lpadmin smith

    That little -a adds the group to your list of groups. Without it, well you get the picture. Here's the fun part: I was no longer a member of the sudo group. Why is that important? Because I was no longer able to access any system commands - I could not add myself back into any groups or do much of anything other than log in and out. I couldn't even reboot the machine. Sigh.

    If I had not closed the connection, I might have been able to fix it right there, but that ship had already sailed.

    The fix: At least I was smart enough to have configured the power button action so it performs a normal shutdown when pressed. I attached a monitor and keyboard and powered it back up. Then I booted into recovery mode from the grub menu and selected the "fsck" option. This will run a disk check, mount the drives read-write (instead of read-only) and then re-offer you the recovery menu. Then I selected "Drop to a root shell" option. This gave me root access and a read-write filesystem. If you choose Root Shell initially, you get a read-only filesystem.

    From here, I simply re-added all the necessary groups and dropped out of the recovery mode back to normal running mode.

    I suppose a good "safety" feature might be to have a second admin user or even install a root user password. But at least I know how to fix this one.

    Please Read Me

    #2
    ,,,,,,,,,well that's a good one
    Glad you got out of it ok .

    it was not today ,,,,,,,,,,but, one time long ago in a distro far away ,,,,,,,,, I was removing file's hear and there through the system from something I had "make install" ed I think ,,,I accidentally hit enter with this in the terminal
    Code:
    # rm -rf /bin
    ,,,,,it was one of those time stands still moments as I realised I had just hit the enter key and what was in the terminal,,,,,,,,I froze ,,, staring at the screen ,,,,,nothing changed ,,,,all "LOOKED" normal ,,,,,,,I thought , maby it didn't take the comand and all is well , I grab the mouse ,,,,,,the cursor is moving ,,,,,,,but clicking on anything is not doing anything ,,,,,in fact I cant do anything but move the cursor around.

    the fix : lucky me had another install of the same system 1 was for mucking about with and one just in case I foobar the other ,,,,, I did half to hard stop the system but rebooting to the secondary install and copying /bin over fixed it .

    I have kept a secondary install on my boxes ever since

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      There are those who can talk the talk and those who can walk the walk.

      woodsmoke

      Comment


        #4
        Originally posted by oshunluvr View Post
        I borked myself on my server.
        Is this a newly acquired talent? Sounds like you probably never really need to leave the house, now...ever.

        Comment


          #5
          "I bork, therefore I am human."
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Originally posted by SteveRiley View Post
            Is this a newly acquired talent? Sounds like you probably never really need to leave the house, now...ever.
            Oh no, I've self-borking for years now. One still has to get out once in awhile just for the fresh air!

            Please Read Me

            Comment


              #7
              Originally posted by oshunluvr View Post
              Oh no, I've self-borking for years now. One still has to get out once in awhile just for the fresh air!
              Yeah, sometimes a change of hands is good.

              Comment


                #8
                Originally posted by SteveRiley View Post
                Yeah, sometimes a change of hands is good.
                lol ^
                ​"Keep it between the ditches"
                K*Digest Blog
                K*Digest on Twitter

                Comment


                  #9
                  lol
                  Dequire....

                  Did you EVER ....think that your simple post would have generated a MULTI page thread? there are so many people jealous of you! lol, just kidding!

                  woodsmoke

                  Comment


                    #10
                    This is a great idea - someone should make a website for simple mistakes like these. Generally if you accidently do it, other people will too.

                    Comment


                      #11
                      talking of dumb things I did on a computer system.

                      Back in the early 90's when DOS was king and Networks were managed by a little known piece of software called Novell Netware, I was doing some file management on my managers pc and not checking which directory I was in I ended up deleting all the files in the wrong directory. The look of panic on my face was a picture thinking that I made this stupid mistake. I was going to grab my copy of Norton Utilities to undelete the files but I didn't need to because lucky for me the IT department always backed up the user groups every night and it was simply a case of restoring all the files from the backup.

                      Fromm that date onwards I always double check that I am deleting files in the correct directory.

                      What a fool I felt!

                      Comment

                      Working...
                      X