I’ve come across this little issue whilst trying to make some changes to my ESX firewall.
I connected to my ESX Host using Putty and logged in using my non-privileged account (Called login) and then to run the ESXCFG commands i needed to change to my Root user.
So i entered su and put in the root password when prompted. I could see that my user account had been changed to root so i tried to run the esxcfg-firewall command.
This is what i found;
As you can see the command esxcfg-firewall command is not found. So i did a bit of research and came across this discussion on the VMware Communities Forum.
Steve Beaver posted the following: “I need you to SU a little different. Try this way “su -” the “-” add the paths to the account”
So i tried that;
And as you can see it worked!! I wasn’t sure what the difference between su and su – was so i did a little digging and come across this post on Linux Questions which told me exactly what i needed to know.
“su” is equiv “su root” and “su -” equiv “su – root”
the diff between “su” and “su -” is “su -” you log in as a root with the env setting/profile (i.e you really log in as a root). just type “pwd” and you will be in the root home dir @ /root.
if you “su” only then basically you just “borrow” the root permission without having all the root env setting/profile . just “su” from your home dir and type “pwd”, you can see that you still in the user dir i.e /home/user
Note: The username login is a temporary user i setup so i could show you print screens. That user has now been removed.
Another VMworld is upon us!!! Sadly, it's only virtual again this year. However, that does…
As part of my recent move to Google, I'm working on quickly getting up to…
I am delighted to announce the next chapter in my career. Today is my first…
In episode thirteen of The VCDX Podcast, I am joined by two special guests who…
In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…
In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…
View Comments
wow...it's fixed my issue.....
Thanks Simon, had the same and your info sorted this our.
Many thanks
Hi,
that's because no environment / user profile was not configured correctly.
after logged on the VMHOST with SSH. you need to
cd /usr/bin
ls
and then , you can run the esx command lines.
Terry