Solved

restarting bash_profile for root user.

Posted on 2007-04-03
3
513 Views
Last Modified: 2013-12-26
I am on a windows machine and I am using tight vnc to login to a linux machine.  You cannot login as root using tight vnc so I created a statndard user called admin.
Once I login as admin I open up a vi editor and su root.
Once in root I run the command ifconfig. It does not work.
I know this works when I login in directly to the linux machine as root.
I'm guessing I have to relaod or restart the bash_profile for root. How do I do this or is it even possible.
Thanks
0
Comment
Question by:dplinnane
  • 2
3 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 18845026
Try

su - root

instead of just

su root

to initialize the profile.
0
 

Author Comment

by:dplinnane
ID: 18845669
Thanks I actually got it working beofre you posted. I'll give you the points if you can tell me what the diffeence between su - root is and su root
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 18845701
'-' implies '-l' which creates a login shell, which automatically causes the profiles to be read. Without that, just the user and group IDs are substituted and the 'old' shell environment remains.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now