chage -M -1 root; echo "" > /etc/security/opasswd

Disable password expiration and clear password history for VMware vcenter appliance

Disable password expiration and clear password history for VMware vcenter appliance

0
By: tsener
2017-07-30 21:26:43

These Might Interest You

  • wget --user=username --password="$password" http://example.org/ Instead of hiding commands entirely from history, I prefer to use "read" to put the password into a variable, and then use that variable in the commands instead of the password. Without the "-e" and "-s" it should work in any bourne-type shell, but the -s is what makes sure the password doesn't get echoed to the screen at all. (-e makes editing work a bit better)


    4
    read -e -s -p "Password: " password
    freiheit · 2010-08-18 17:53:27 1
  • If you're a moron like me, sometimes your fingers get away from you and you, for example, enter your password when you're already authenticated to ssh-agent, sudo, etc., and your password ends up in shell history. Here's how to get it out. Show Sample Output


    29
    history -d
    sud0er · 2009-04-27 20:19:09 3

  • -2
    grep -i s2enc /etc/vcac/server.xml | sed -e 's/.* password=\"\([^\"]*\)\".*/\1/' | xargs -n 1 vcac-config prop-util -d --p 2>/dev/null; echo
    tsener · 2017-03-28 14:11:55 1
  • Type ^u at password prompt to clear a mistyped password.


    7
    ^u
    zgomot · 2009-02-05 21:37:46 0
  • create and md5 sum of your password without it showing up in your terminal or history. Afterwards we overwrite the $p variable (thx to bazzargh) Show Sample Output


    1
    read -s p && echo -n $p | md5sum;p=
    hoodie · 2012-06-08 13:50:50 4
  • These are my favourite switches on pwgen: -B Don't include ambiguous characters in the password -n Include at least one number in the password -y Include at least one special symbol in the password -c Include at least one capital letter in the password It just works! Add a number to set password length, add another to set how many password to output. Example: pwgen -Bnyc 12 20 this will output 20 password of 12 chars length. Show Sample Output


    5
    pwgen -Bnyc
    KoRoVaMiLK · 2012-03-15 14:38:15 1

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: