Peter's Blog

Another guy talking nonsense!

Archive for the ‘debian’ tag

Reset root password in Debian

without comments

Today I’ve faced embarrassing situation, I’ve forgot my root password to my Debian VM. I know this is lame. But happened, so I’ve started looking for solution and after viewing few more or less helpful websites I’ve compiled my own solution. To reset root password on Debian (Lenny) do following:
1. During start of PC when there is your boot manager displayed press “e”.
2. Move arrow on the keyboard to highlight “kernel”.
3. Press “e” again.
4. On the displayed line change “ro” to “rw” and add “init=/bin/bash” at the end. Without quotation marks of course.
5. Press Enter and then “b” to boot your Debian.
6. Debian would boot to bash console with root privileges. Now execute “passwd” command and input your new password.
7. Reboot your system.

That’s it. Your root account is now back. Enjoy!

Written by Peter

September 21st, 2009 at 12:53 pm

Posted in IT,Main,debian

Tagged with , , , , ,

How to get colored syntax in Vim on Debian

without comments

I’m using Debian Linux as a second operating system. Previously I was using it only for my servers, but now I’ve decided to start doing some software development on it. As I love bash environment, the choice of text editor was pretty obvious, Vim, the greatest editor ever made. But problem was that I like my syntax to be colored, it’s easier to write program code then. No problem, I thought, quick searching via Google gave me the “:syntax on” command which should enable what I’ve wanted. After typing it in my Vim I’ve received a message “command not available in this version”, WTF? So I’ve searched and searched, and searched a little more:) And finally solved it!

To have colored syntax in Vim on Debian:
1. Login as root.
2. Execute “apt-get install vim-full”.
3. Edit “/etc/vim/vimrc” and uncomment line with “syntax on, by simply deleting ” sign.

That’s it! It’s working now. Last step (3) is not necessary, but it gives colored syntax to all users without need of typing “:syntax on” command every time Vim is started. Hope it would help somebody, because it took me a while to find this solution, so maybe I would spare this to you. I know it’s not best solution, because it’s installing a lot of stuff which you (and I) will probably never use, but for now it’s the only one I have. If you know how to get same result with less things to be installed, please let me know.

Written by Peter

August 27th, 2009 at 4:39 pm

Posted in IT,Software,Tips

Tagged with , , , ,