Re: Perl one liner - passwd confirmation

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

 



> I'll give you a hint.  You need to escape some of those special
> characters.
>

I tried escaping the $ but no luck.  I also happened to notice  that :

[root@psinode root]# perl -e 'crypt(pass,hjjghg)'

got no error responses,

while:
[root@psinode root]# perl -e 'crypt(pass,1HsKZkjLV)'

returned:

Bareword found where operator expected at -e line 1, near "1HsKZkjLV"
        (Missing operator before HsKZkjLV?)
syntax error at -e line 1, near "1HsKZkjLV"
Execution of -e aborted due to compilation errors.

Which makes me wonder what the crypt function is willing to accept as a
salt.
Meanwhile, here are my attempts at escaping the special characters:

[root@psinode root]# perl -e 'crypt(pass,/$1/$HsKZkjLV/$)'
Scalar found where operator expected at -e line 1, near "/$1/$HsKZkjLV"
        (Missing operator before $HsKZkjLV?)
syntax error at -e line 1, near "/$1/$HsKZkjLV"
Execution of -e aborted due to compilation errors.

[root@psinode root]# perl -e 'crypt(pass,/$1$HsKZkjLV$)'
Search pattern not terminated at -e line 1.



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux