Hay everyone, Consider bellow condition:
users = UserAccounts(topo.standalone, f"ou=Keywords,{DEFAULT_SUFFIX}", rdn=None) for i in [f'NONE_2_KEY,ou=Authmethod', f'EVERYDAY_KEY,ou=Dayofweek', f'TODAY_KEY,ou=Dayofweek', f'NODAY_KEY,ou=Dayofweek', f'NETSCAPEDNS_KEY,ou=DNS', f'FULLIP_KEY,ou=IP', f'NETSCAPEIP_KEY,ou=IP', f'NOIP_KEY,ou=IP', f'FULLWORKER_KEY,ou=Timeofday', f'DAYWORKER_KEY,ou=Timeofday', f'NIGHTWORKER_KEY,ou=Timeofday', f'NOWORKER_KEY,ou=Timeofday']: properties = { 'uid': i, 'cn': i.split(',')[0], 'sn': 'user', 'uidNumber': '1000', 'gidNumber': '2000', 'homeDirectory': '/home/' + i, 'userPassword': PW_DM } users.create(properties=properties) If you see the created users: for i in users.list(): i.dn 'uid=NONE_2_KEY\\2Cou\\3DAuthmethod,ou=Keywords,dc=example,dc=com' 'uid=EVERYDAY_KEY\\2Cou\\3DDayofweek,ou=Keywords,dc=example,dc=com' 'uid=TODAY_KEY\\2Cou\\3DDayofweek,ou=Keywords,dc=example,dc=com' 'uid=NODAY_KEY\\2Cou\\3DDayofweek,ou=Keywords,dc=example,dc=com' 'uid=NETSCAPEDNS_KEY\\2Cou\\3DDNS,ou=Keywords,dc=example,dc=com' 'uid=FULLIP_KEY\\2Cou\\3DIP,ou=Keywords,dc=example,dc=com' 'uid=NETSCAPEIP_KEY\\2Cou\\3DIP,ou=Keywords,dc=example,dc=com' 'uid=NOIP_KEY\\2Cou\\3DIP,ou=Keywords,dc=example,dc=com' 'uid=FULLWORKER_KEY\\2Cou\\3DTimeofday,ou=Keywords,dc=example,dc=com' 'uid=DAYWORKER_KEY\\2Cou\\3DTimeofday,ou=Keywords,dc=example,dc=com' 'uid=NIGHTWORKER_KEY\\2Cou\\3DTimeofday,ou=Keywords,dc=example,dc=com' 'uid=NOWORKER_KEY\\2Cou\\3DTimeofday,ou=Keywords,dc=example,dc=com' We can see users become useless to use for further operations. And consider bellow condition: for i in [f'NONE_2_KEY,ou=Authmethod', f'EVERYDAY_KEY,ou=Dayofweek', f'TODAY_KEY,ou=Dayofweek', f'NODAY_KEY,ou=Dayofweek', f'NETSCAPEDNS_KEY,ou=DNS', f'FULLIP_KEY,ou=IP', f'NETSCAPEIP_KEY,ou=IP', f'NOIP_KEY,ou=IP', f'FULLWORKER_KEY,ou=Timeofday', f'DAYWORKER_KEY,ou=Timeofday', f'NIGHTWORKER_KEY,ou=Timeofday', f'NOWORKER_KEY,ou=Timeofday']: properties = { 'uid': i, 'cn': i.split(',')[0], 'sn': 'user', 'uidNumber': '1000', 'gidNumber': '2000', 'homeDirectory': '/home/' + i, 'userPassword': PW_DM } users = UserAccount(topo.standalone, f"cn={i},ou=Keywords,{DEFAULT_SUFFIX}") users.create(properties=properties) users = UserAccounts(topo.standalone, f"ou=Keywords,{DEFAULT_SUFFIX}", rdn=None) for i in users.list(): i.dn 'cn=NONE_2_KEY,ou=Authmethod,ou=Keywords,dc=example,dc=com' 'cn=EVERYDAY_KEY,ou=Dayofweek,ou=Keywords,dc=example,dc=com' 'cn=TODAY_KEY,ou=Dayofweek,ou=Keywords,dc=example,dc=com' 'cn=NODAY_KEY,ou=Dayofweek,ou=Keywords,dc=example,dc=com' 'cn=NETSCAPEDNS_KEY,ou=DNS,ou=Keywords,dc=example,dc=com' 'cn=FULLIP_KEY,ou=IP,ou=Keywords,dc=example,dc=com' 'cn=NETSCAPEIP_KEY,ou=IP,ou=Keywords,dc=example,dc=com' 'cn=NOIP_KEY,ou=IP,ou=Keywords,dc=example,dc=com' 'cn=FULLWORKER_KEY,ou=Timeofday,ou=Keywords,dc=example,dc=com' 'cn=DAYWORKER_KEY,ou=Timeofday,ou=Keywords,dc=example,dc=com' 'cn=NIGHTWORKER_KEY,ou=Timeofday,ou=Keywords,dc=example,dc=com' 'cn=NOWORKER_KEY,ou=Timeofday,ou=Keywords,dc=example,dc=com' Here users are in good shape . Any suggestion. Should it be fixed . Regards Anuj Borah
_______________________________________________ 389-devel mailing list -- 389-devel@lists.fedoraproject.org To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/389-devel@lists.fedoraproject.org