On Thu, Aug 31, 2023 at 03:25:29AM BST, Jeevan Reddy wrote:
> Hi,
>
> I am trying to change a UID to a static one for a group of users and when I
> apply the salt state I see an error *Comment: These values could not be
> changed: {'uid': 20000} Code: *
>
>
>
> * jreddy: fullname: Jeevan Reddy groups: - noc uid: 20000*
>
>
> *salt state init.sls file:*user.present:
> - name: jreddy
> - fullname: Jeevan Reddy
> - home: /home/ jreddy
> - gid: {{ salt['file.group_to_gid']('users') }}
> - uid: 20000
> - allow_gid_change: True
> - allow_uid_change: True
>
>
> *After applying the salt state I see the below error:*---------- ID:
> noc_jreddy Function: user.present Name: jreddy Result: False Comment: These
> values could not be changed: {'uid': 20000} Started: 12:08:22.066106
> Duration: 37.808 ms Changes:
>
> My question is when we set this flag *allow_uid_change **to *True then salt
> should be able to change the UID right?
Hi Jeevan,
Salt won't make any changes if the user's logged in - make sure you had
logged out.
Regards,
Raf