%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/samba/netcmd/domain/auth/__pycache__/ |
| Current File : //lib/python3/dist-packages/samba/netcmd/domain/auth/__pycache__/silo_member.cpython-312.pyc |
�
�I�d� � � � d dl mZ d dlmZ d dlmZmZmZm Z d dl
mZmZ d dl
mZ G d� de� Z G d� d e� Z G d
� de� Z G d� d
e � Zy)� N)�Dn)�Command�CommandError�Option�SuperCommand)�AuthenticationSilo�User)�
ModelErrorc � � e Zd ZdZdZej ej d�Z e ddde
dd� � e d
ddd
e
�� e dddd
e
�� gZ dd�Zy)�cmd_domain_auth_silo_member_addz'Add a member to an authentication silo.�%prog -H <URL> [options]�� sambaopts�credopts�-H�--URL�&LDB URL for database or target server.�URL�ldap_url��help�type�metavar�dest�--name�'Name of authentication silo (required).�name�store�r r �actionr �--memberz/Member to add to the silo (DN or account name).�memberNc � � |st d� �|st d� �| j |||� } t j ||�� }|�t d|� d�� � dt ||� i} t j |fi | ��}
|
�t d|� d �� �|j |
_ |j ||
� |
j |� | j j d|
j � d
|� d�� y # t $ r}t |� �d }~ww xY w# t $ r d|i} Y ��w xY w# t $ r}t |� �d }~ww xY w# t $ r}t |� �d }~ww xY w)N�Argument --name is required.�Argument --member is required.��cn�Authentication silo � not found.�dn�username�User '�' not found.z' added to the � silo.
)r �ldb_connectr �getr
r �
ValueErrorr r* �
assigned_silo�
add_member�save�outf�writer ��selfr r r r r"