On 2013.06.05 13:58, Pol Hallen wrote:
> Hi all :-)
>
> Manually situation:
>
> userdbpw -md5 | userdb user0@domain0 set systempw
>
> I need insert the new password :-/
>
> I'd like automatically set password by a script using apg:
>
> pass=$(apg)
>
> echo $pass
>
> yHjmdiuO
>
> how put $pass variable to userdbpw?
>
> thanks!
>
> Pol
>

man userdbpw

>        userdbpw reads a single line of text on standard input,
> encrypts it,
>        and prints the encrypted result to standard output.

# echo abrakadabra|userdbpw -md5
$1$Df9ltoSc$1ysaLtY6PE9zkASy8BRRe.

How to combine this with field change in the file is left as an
exercise. Not very difficult, I hope. :-)

-- 
Aidas Kasparas
IT administrator
GM Consult Group, UAB

http://www.gmc.lt


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to