12/17/2023 0 Comments Sudo su ec2 user![]() ![]() I'm so.SSH to your EC2 Instance as standard ec2-user sudo adduser -m testuser If all is well, you should now be able to login and SSH into your EC2 instance and use sudo once again!.(It might take a few seconds / minutes to restart). Now, navigate to the Instances section and Start your original instance again.Mount it back on the original instance (DO NOT FORGET - use the same /dev/whatever/ volume path your original instance was using prior to all these steps).Unmount the fixed volume from the Recovery instance.Now it's just a matter of reversing the steps!īack to the AWS configuration page, go to the EBS Volume section. etc/sudoers To fix its chmod value, do this: etc/sudoersĬonfirm that this file's ownership and/or chmod value is in fact incorrect. etc and not /etc to indicate to modify the permissions / ownership on the /bad/etc/sudoers file, NOT this Recovery EBS volume! One broken volume is enough, right? VERY IMPORTANT Note in the following couple steps how I'm using. If that goes well, you should now be able to cd into that /bad directory and see the same file structure you would normally see when it's mounted on your original (currently problematic) instance. ![]() (NOTE: If this doesn't work, you may have encountered the same issue I had, so try the following instead: sudo mount /dev/xvdf1 /bad, thanks to this answer ). Set your current working directory to the root: cd /Ĭreate a directory to hold your problem EBS volume: sudo mkdir bad Login / SSH into your Recovery box (you can lookup your Recovery instance IP / host address in the Instances section in AWS). Refresh, confirm it's now "in-use" in your recovery instance. Mount the volume to your new Recovery instance (if you can't see your recovery instance in the list, you probably missed the "subnet" step I mentioned above - and you will need to redo your Recovery instance all over again to match that subnet setting).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |