LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Closed Thread
  Search this Thread
Old 01-31-2006, 02:07 AM   #1
hotbacteria
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Rep: Reputation: 0
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

Regards
Tarun
 
Old 01-31-2006, 02:13 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 01-31-2006, 02:27 AM   #3
hotbacteria
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Original Poster
Rep: Reputation: 0
[QUOTE=timmeke]Login as normal user, then do
su
or
su root
QUOTE]

Thanks Timmeke for replying. Would you please tell me where i have to "do the su". Should i write it in a terminal or what ?

Regards
Tarun
 
Old 01-31-2006, 04:20 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Please don't crosspost in different forums.
http://www.linuxquestions.org/questi...d.php?t=409900
http://www.linuxquestions.org/questi...d.php?t=409901
 
Old 01-31-2006, 04:26 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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?
 
Old 02-01-2006, 03:24 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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.

http://www.linuxquestions.org/rules.php
 
  


Closed Thread



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
~/.bash_profile not being executed at login Radicalm16 Slackware 9 07-28-2009 09:39 PM
Regarding .bash_profile under Root authentication hotbacteria Fedora 6 01-31-2006 11:04 PM
need root .bashrc .bash_profile darkRoom Slackware 5 04-30-2005 03:24 AM
.bash_profile as root knoxlinuxuser Linux - Newbie 3 02-26-2005 10:48 AM
.bash_profile overwritten on login to root Awesome Dude Linux - Newbie 1 08-23-2004 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:55 PM.

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
Open Source Consulting | Domain Registration