[Freeipa-users] attempting to Import Local Accounts into FreeIPA Server on Fedora 25: ipa: ERROR: Could not get User login interactively

Standa Laznicka slaznick at redhat.com
Wed Nov 30 07:49:46 UTC 2016


On 11/29/2016 09:35 PM, Robert Kudyba wrote:
>
>> On Nov 29, 2016, at 11:37 AM, Rob Crittenden <rcritten at redhat.com 
>> <mailto:rcritten at redhat.com>> wrote:
>>
>> Robert Kudyba wrote:
>>> I知 trying to use the script posted on
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__shellonearth.net_import-2Dlocal-2Daccounts-2Din-2Dfreeipa-2Drhelcentos_&d=DgIDAw&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=X0jL9y0sL4r4iU_qVtR3lLNo4tOL1ry_m7-psV3GejY&m=qUO21wyGfiMBRaZk6rjEMSMEMYZB0QpBVyQTCq3U6lw&s=9CmZV-vE0Nle4yup0VrHuHVnMuPNCBaOcJQkR4GzebM&e= 
>>> .
>>> I知 getting the below error. Have the options for ipa user-add changed
>>> recently? Here痴 what the error looks like in context from the CLI:
>>>
>>> Password for admin at ourdomain:
>>> User login:
>>> ipa: ERROR: Could not get User login interactively
>>>
>>> Here is what痴 in the script:
>>>
>>> ipa user-add $USER --first=$FIRST --last=$LAST --cn="$FULL"
>>> --displayname="$FULL" --uid=$UUID --gidnumber=$GID --setattr
>>> userpassword='{crypt}$CRYPT'
>>>
>>>
>>
>> Are you sure $USER has a value?
>>
>> It looks like it is falling back on interactive prompting for required
>> fields.
>
> Thanks that gave me a clue. The script was looking for a group ID of 8 
> characters long I changed it to 4:
> forline in"$(echo $p | grep "x:[0-9][0-9][0-9][0-9]*:")"# Only grep 
> user accounts with IDs of 4 digits or more
>
> But now the script just “hangs” and no response. I confirmed 
> permissions of the shadow and passwd files and just using 20 login 
> names from each file. Nothing shows up in the user search of the 
> FreeIPA GUI.
>
>
>
Well, I may not be that fluent in bash as I used to be, but from what I 
see here, it's quite obvious. Line 39 - you have a `while read p` part 
there that waits for input from stdin. That's where you hang. How you 
managed to get to `ipa user-add` line before I am not really certain.

Did you perhaps mean to read from /tmp/passwd or /tmp/shadow on L39? :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-users/attachments/20161130/7d2c8c73/attachment.htm>


More information about the Freeipa-users mailing list