LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2012, 06:55 AM   #1
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Rep: Reputation: 21
Talking Edited .bashrc now cannot login as root


Hi All,
I had edited my .bashrc file using the blog http://www.cyberciti.biz/tips/bash-a...inux-unix.html.There is an alias vi=vim.Now when I am trying to edit any file it says vim command not found.Also to install vim when I run the command yum isntall -y vim it says

ajit is not into sudoers file.The incident will be reported.

Now I cannot edit by bashrc file.I cannot edit my sudoers file.Can someone tell me how can I edit my sudoers file.I cannot login as root.How do I get out of the situation.Please help.
 
Old 06-18-2012, 07:07 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,879

Rep: Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910
you need to remove that alias, or use vi with full path. execute yum as root, not as normal user.





_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
 
Old 06-18-2012, 08:13 AM   #3
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Original Poster
Rep: Reputation: 21
You can always unalias an alais using the command unalias command
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bashrc and root fluxism Linux - Newbie 9 06-16-2009 10:11 AM
edited the wheel group file and i cant log in as root again in the terminal cheezy86 Linux - Newbie 6 05-16-2009 08:37 PM
'bashrc user login karanjeet Linux - Desktop 1 07-18-2008 11:34 AM
.login, .bashrc or .cshrc ??? tuananhbirm Linux - General 1 01-20-2005 10:44 AM
Graphical login not working? Edited inittab... streamalot Linux - General 6 02-22-2002 10:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration