PDA

View Full Version : [ubuntu] unable to log in after editing bashrc



suspect x
November 8th, 2011, 10:11 PM
Problem after editing the .bashrc file to add some colores to "user@host:dir$"
I've added a file to "/etc/skel/colors.sh" and I can't login again
iam using ubuntu 10.04 LTS lucid

Shazaam
November 9th, 2011, 12:02 AM
Boot up a livecd, mount the drive you need, then edit the files in question. Reboot.
You will need to do this as root. Here is the terminal command (be careful as you get ABSOLUTE root rights on the drive(s); mistakes can be permanent) once the livecd boots to a desktop...

gksudo nautilus

As a reminder, before you edit system files back them up. That way you can go back and use the originals if you make a mistake.

suspect x
November 10th, 2011, 02:48 PM
thanks for helping me ,
but can I ask you to put the standard .bashrc file so I can compare both files !
thanks

nothingspecial
November 10th, 2011, 02:51 PM
A standard .bashrc is located at

/etc/skel/.bashrc

You can copy it to your home folder.

suspect x
November 10th, 2011, 07:40 PM
am afraid that I've accidentally overwritten that file :-(