Seite 1 von 1

special caracter % in user password fails

Verfasst: 27 Jan 2015, 17:58
von lebourg
Hello,

I'm using package Local_user from
wiki/userspace:local_user

For instance if the password is XXX%YYY the user's creation fails.

Looking at the log, I can see that the command "net user ...." is invalid due to the % :

Code: Alles auswählen

C:\Windows\system32>NET USER xunil XXXno /passwordreq:yes


Instead of :

Code: Alles auswählen

NET USER $local_user$ $val_userpasswd$ /ADD /passwordchg:no /passwordreq:yes
It seems like the % shrinks the command line.

Note that the following command works well in the windows command interpreter :

Code: Alles auswählen

NET USER toto XXX%YYY /ADD /passwordchg:no /passwordreq:yes
Can anyone tell me how and where to devaluate the % ?

Thank you.

Re: special caracter % in user password fails

Verfasst: 27 Jan 2015, 18:04
von dkoch
Have you tried "\%" ?

Re: special caracter % in user password fails

Verfasst: 29 Jan 2015, 17:32
von lebourg
Yes I've tried it but the problem is the same.

Re: special caracter % in user password fails

Verfasst: 30 Jan 2015, 14:04
von n.wenselowski
Hello,

did you try to use a double percent sign? (%%)


With kind regards

Niko

Re: special caracter % in user password fails

Verfasst: 30 Jan 2015, 15:34
von lebourg
Hello,

A double percent works fine.

Thank you,
I couldn't find this at the documentation.