[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't create a password successfully.



On 4/3/22 20:05, Greg Marks wrote:
i have a trouble of creating a password.. It says "The
password does not contain the required characters."

I have tried everything and still doesn't get to work.

You might try a command like this:

    </dev/urandom tr -dc 'A-Za-z0-9@#*()+={}/?~;,.-_' | head -c 60

Of course, you can change the password length (here 60) and the
characters enclosed in the single quotation marks to match your
requirements.

Best regards,
Greg Marks


That's sick.  I like it.  }:->

2022-04-03 21:25:48 dpchrist@tinkywinky ~
$ cat /etc/debian_version ; uname -a
9.13
Linux tinkywinky 4.9.0-18-amd64 #1 SMP Debian 4.9.303-1 (2022-03-07) x86_64 GNU/Linux

2022-04-03 21:36:46 dpchrist@tinkywinky ~
$ </dev/urandom tr -dc 'A-Za-z0-9@#*()+={}/?~;,.-_' | head -c 60
.CEqNR\bu[xnQw0Zn/Al>I@pJFg.BVt0SP(\=MZDRM+fo>Il^A;C?9Ap0b]e


The last three characters of the argument to tr(1) specify a range. Was that intentional?

.-_


And, I believe you have missed some printing characters (85 vs. 94):

2022-04-03 21:26:14 dpchrist@tinkywinky ~
$ perl -e 'print chr for 0 .. 127' | tr -dc 'A-Za-z0-9@#*()+={}/?~;,.-_'
#()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{}~

2022-04-03 21:26:42 dpchrist@tinkywinky ~
$ perl -e 'print chr for 0 .. 127' | tr -dc '[:graph:]'
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~


But, 384+ bits of entropy ought to be secure for the foreseeable future. (Just don't ask me to type the generated passwords.)


David


Reply to: