special caracter % in user password fails

Antworten
lebourg
Beiträge: 5
Registriert: 27 Jan 2015, 16:37

special caracter % in user password fails

Beitrag 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.
dkoch
Beiträge: 309
Registriert: 25 Nov 2011, 14:03

Re: special caracter % in user password fails

Beitrag von dkoch »

Have you tried "\%" ?
lebourg
Beiträge: 5
Registriert: 27 Jan 2015, 16:37

Re: special caracter % in user password fails

Beitrag von lebourg »

Yes I've tried it but the problem is the same.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: special caracter % in user password fails

Beitrag von n.wenselowski »

Hello,

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


With kind regards

Niko

Code: Alles auswählen

import OPSI
lebourg
Beiträge: 5
Registriert: 27 Jan 2015, 16:37

Re: special caracter % in user password fails

Beitrag von lebourg »

Hello,

A double percent works fine.

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