Solved

restarting bash_profile for root user.

Posted on 2007-04-03
3
515 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Fetching data from Multiple Linux Server using Shell Scripting 55 138
Message not shown 5 51
ifconfig 4 46
number in printf 13 27
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

831 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