Categories: VMware

ESXCFG Command not Found

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.

Simon Long

View Comments

Share
Published by
Simon Long

Recent Posts

Google Cloud VMware Engine @ VMworld 2021

Another VMworld is upon us!!! Sadly, it's only virtual again this year. However, that does…

3 years ago

Google Cloud VMware Engine – Learning Resources

As part of my recent move to Google, I'm working on quickly getting up to…

3 years ago

Hey Google!

I am delighted to announce the next chapter in my career. Today is my first…

3 years ago

EP13 – Defending Remotely

In episode thirteen of The VCDX Podcast, I am joined by two special guests who…

3 years ago

Getting Started With Oracle Cloud VMware Solution (OCVS) – Migrating Workloads Using VMware HCX

In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…

3 years ago

Getting Started With Oracle Cloud VMware Solution (OCVS) – Connecting To An On-Premises Environment

In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…

3 years ago