Solved

restarting bash_profile for root user.

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to install java on RHEL image on EC2 4 41
Red Hat 7 Linux on Azure cannot run a command as root 22 54
SMB share across internet 15 67
Check for Linux process in script 7 49
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Fine Tune your automatic Updates for Ubuntu / Debian
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
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.

821 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