Daniel Ruiz via FreeIPA-users wrote: > Hello, > > thanks for your new answer, Rob. Yes, with a simple script, you could take > all NIS users and, then, run "ipa user-add" assigning UID and GID to insert > them into the FreeIPA database. But my question is for a new user. I have > read that I can use "--mkhomedir" to create homedir in the first login, but > my clients are NFS, so I don't know if news homedirs would be created. > Because of that, I prefer to create homedirs manually and, after, run "ipa > user-add" for the new users. Then, question is what UID/GID must have homedir > is I have created it BEFORE "ipa user-add" and, by default, that folder will > be owned by "root.root"?
IPA provides no automation to do this. It seems like you're trying to put the cart before the horse. IPA doesn't require that the home directory set when the user is created actually exists. You can't know 100% what the next UID/GID will be so set it in advance. So I'd do the reverse of what you're doing. Create the user. The output will include the uid/gid. Then create the directory a chown it. Or create the directory as root:root. Create the user. Then chown it. They are effectively equivalent. The only way you can pre-create the directory with a specific uid/gid is to ALSO create the user with the same uid/gid. That's fine if you don't mind the additional work. rob rob -- _______________________________________________ FreeIPA-users mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/[email protected] Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
