Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when setting password containing & at command line #198

Open
bbjunkie opened this issue Dec 26, 2024 · 2 comments
Open

Error when setting password containing & at command line #198

bbjunkie opened this issue Dec 26, 2024 · 2 comments

Comments

@bbjunkie
Copy link

Various scripts fail to run when the user's password has the & character, returning "Command not found" and exit code 127

Can it be replicated? Yes, every time.
Workaround: Change password to not contain &

@liponcio
Copy link

Also problems with password containing other special characters eg: "~" and ";"

@mrwicks
Copy link

mrwicks commented Jan 24, 2025

You have to escape out the "&" character using either \& or placing it in quotes like "XXXXX&XXXX"

These are shell scripts, so if you're using "weird characters", the shell will try to interpret it. The & is used to place programs in the background, * is a glob, etc. Placing a backslash before the character should work. If you're setting a variable you MAY need to set it with a TRIPLE backslash, i.e. \\\X or if using quotes \"XXXXX&XXXX\" if you're setting variables to do a "one liner".

If you're able to change your password, do that. Go find a website that generates random passwords, have a generate one, and mix up the order of the characters of the password randomly. That way, the website won't know what you're using. You cannot type in random characters, I can prove this statistically :) That's not how the human brain works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants