[Freeipa-devel] how to set/modify ipa user's password in non-interactive mode

yi zhang yzhang at redhat.com
Thu May 21 22:31:55 UTC 2009


yi zhang wrote:
> Hi:
> I am trying to create a user with initial password with "ipa add-user" 
> command in non-interactive mode. but no success.
>
> I tried
> ipa user-add --first=user --last=002 --home=/usershome/u002 
> --shell=/usr/bash --password=test123 u002
> -- no luck
>
> ipa user-add --first=user --last=002 --home=/usershome/u002 
> --shell=/usr/bash --password u002
> -- brings me in interactive mode
just find a dirty way:
yes thisisapassword | ipa user-add --first=user --last=002 
--home=/usershome/u002 --shell=/usr/bash --password u002

and it works
>
> I tried to create it first and then run "ipa passwd u002" but no luck 
> as well
> # ipa passwd u002
> password:
> Enter password again to verify:
> ipa: ERROR: an internal error has occured  <<--found a typo here, 
> should be "occurred"
>
> Any idea how I can do it in one line of code?
>
> Thanks
>
> Yi
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090521/9472a7b0/attachment.htm>


More information about the Freeipa-devel mailing list