Packer Naming Conflicts

Packer Naming Conflicts with Linux Native Command

HashiCorp Packer is a standalone tool for image management across multi-cloud providers. The installation is simple. But you may experience packer command naming conflicts if the OS is Red Hat or CentOS.

For example, run following command and see nothing returned back on the screen.

packer

And if you hit ‘Enter’ key. The return is:

skipping line: 1
skipping line: 2
skipping line: 3
skipping line: 4
skipping line: 5
skipping line: 6
skipping line: 7

If you see same behavior on the machine. Certainly you are experiencing the same issue here.

The reason is the packer naming conflicts with the Red Hat / CentOS native module cracklib. Some articles on the internet say delete the native packer command. However, I think that’s not an ideal option. Because the module is used to generate a random password and check the password complex level.

The alternative I’m using is rename my HashiCorp Packer command.

Firstly, you need to rename the HashiCorp Packer command:

mv packer packer.io

Secondary, specific the HashiCorp Packer path in the environment variables. I assume the HashiCorp Packer is installed under /packer/ directory.

cd /etc/
echo 'PATH="$PATH:~/packer/"' >> .bash_profile
source .bash_profile

The drawback is you have to use the renamed command packer.io instead of packer for HashiCorp Packer.

Following are some references about cracklib.

How To Check Password Strength In Linux With Cracklib?

cracklib2 – utilities

Update 05/21/2021: HashiCorp document also mentioned this issue. Thanks, Abe! 🙂