Cannt login as root . made changes to .bash_profile
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Cannt login as root . made changes to .bash_profile
Hi all
I am in a fix. I edited the PATH of the Root user's .bash_profile . So i am unable to login as root now. I can login as a user but than I cann't access the important data which is lying under Root Authentication and execute it as i don't have permissions.
Can some one help me how can i fix it ?
Is there any way out by which i can change permissions to the user so that i can access ,write and execute that root data from my user account ?
or better if there any way i can correct the .bash_profile of my root account while staying in user account ?
Please Let me know at hotbacteria @ rediffmail com
Login as normal user, then do
su
or
su root
Do not add the "-" as this will load root's environment, including probably his .bash_profile.
After the "su", you'll need to supply root's password and then you're done. You then have become the root user and can edit the .bash_profile once more to correct your mistake.
Just a tip. If you don't want to get additional spam, don't post your private e-mail addresses on any forum.
The forum's mechanisms will send you a mail automatically when someone replies to your posts.
Yes, use a terminal.
To recap:
-login as normal user
-open terminal
-do the "su" command and supply root's password
-edit the file ~root/.bash_profile (.bash_profile in root's home directory) and correct your mistakes
-type "exit" to return to your normal user
-type "exit" once more if you want to close your terminal again.
Wim_Sturkenboom, did you report the crossposting to the moderators?
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.