Skip to content

Conversation

@kro-cat
Copy link

@kro-cat kro-cat commented Aug 15, 2024

fix(distroutils): encode cmd_input argument for ext_utils.run_send_stdin()

The method ext_utils.run_send_stdin() (in extensionutils.py) requires
the second argument, cmd_input, to be a bytes object, not a string
object. This is due to the usage of: subprocess.Popen().communicate().
Encode the password as utf-8 when passing to ext_utils.run_send_stdin().

fix(distroutils): add **kwargs to FreeBSDDistro.chpasswd()

When operating FreeBSD, the argument crypt_id is passed to an
overridden method chpasswd() in the FreeBSDDistro class. The definition
of this method does not contain an argument for 'crypt_id' or
'salt_len'. To address this issue, add **kwargs to the definition of
chpasswd() in the FreeBSDDistro class.

Commit to master (Aug 23, 3034):
This was not related to the issue, but it's inclusion is appropriate to the FreeBSDDistro class.

fix(distroutils): use /etc/pw.conf to discern accounting information.

/etc/user.defs is the shadow configuration file. FreeBSD user management
uses the pw utility.

fixes: #1839

When operating FreeBSD, the argument crypt_id is passed to an
overridden method chpasswd() in the FreeBSDDistro class. The definition
of this method does not contain an argument for 'crypt_id' or
'salt_len'. To address this issue, add **kwargs to the definition of
chpasswd() in the FreeBSDDistro class.
…din()

The method ext_utils.run_send_stdin() (in extensionutils.py) requires
the second argument, cmd_input, to be a bytes object, not a string
object. This is due to the usage of: subprocess.Popen().communicate().
Encode the password as utf-8 when passing to ext_utils.run_send_stdin().
@kro-cat kro-cat requested review from a team, D1v38om83r and nkuchta as code owners August 15, 2024 19:35
@kro-cat
Copy link
Author

kro-cat commented Aug 23, 2024

@microsoft-github-policy-service agree

/etc/user.defs is the shadow configuration file. FreeBSD user management
uses the pw utility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing password using Azure Portal does not work in FreeBSD

1 participant