I think i've broke my debian bad, wasn't following instruction closely... need to learn how to read again. I was trying to get color-coding to work in my terminal (different colors for directories, files, exec and such) and modified .bashrc file in "/", root (not the super user) by adding something, i already forgot what to it, i think it was " source ~/.bashrc "
everything else was commented out. Now I can't use sudo -s command, after punching in password it give me: Segmentation fault and kicks me back to regular user $. I've tried to open .bashrc with nano and vim, but both show nothing, nano says "Directory '.' is not writable" so i can't even show what i've done. Is there any cure for that?
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
"Segmetation fault" after modifing .bashrc as a rootuser
Re: "Segmetation fault" after modifing .bashrc as a rootuser
You probably f*cked up root's .bashrc (by telling it to source itself..)MaxTH wrote:I think i've broke my debian bad, wasn't following instruction closely... need to learn how to read again. I was trying to get color-coding to work in my terminal (different colors for directories, files, exec and such) and modified .bashrc file in "/", root (not the super user) by adding something, i already forgot what to it, i think it was " source ~/.bashrc "
everything else was commented out. Now I can't use sudo -s command, after punching in password it give me: Segmentation fault and kicks me back to regular user $. I've tried to open .bashrc with nano and vim, but both show nothing, nano says "Directory '.' is not writable" so i can't even show what i've done. Is there any cure for that?
You just need to get root without running bash, i.e. don't do "sudo -s" (which will run root's shell), but just "sudo /bin/sh", which should not run .bashrc.
Then fix your mess.
Re: "Segmetation fault" after modifing .bashrc as a rootuser
Also, you can boot your rig with a live CD and replace the file in question with a default file. The one on the live CD should work.
Re: "Segmetation fault" after modifing .bashrc as a rootuser
already reinstall the system, couldn't wait But thank you guys! I really appreciate it!
now i'm sad i could try all that stuff you recommended , very interesting stuff!
now i'm sad i could try all that stuff you recommended , very interesting stuff!
Re: "Segmetation fault" after modifing .bashrc as a rootuser
Do it again!
Nobody would ever ask questions If everyone possessed encyclopedic knowledge of the man pages.
- sunrat
- Administrator
- Posts: 6478
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 474 times
Re: "Segmetation fault" after modifing .bashrc as a rootuser
Could have just restored the backup of the .bashrc file that you made before editing it.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Re: "Segmetation fault" after modifing .bashrc as a rootuser
No-no-no lesson learned, they tell you to be careful with root, but i guess you need to experience it for your selfacewiza wrote:Do it again!
Re: "Segmetation fault" after modifing .bashrc as a rootuser
i usually do back up Thank you sir! (takes off the hat and bows)sunrat wrote:Could have just restored the backup of the .bashrc file that you made before editing it.