Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP:Update man pages for chage, shadow, passwd #1243

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

domiborges
Copy link

Hi! @ikerexxe suggested I could use the opportunity of #1238 to review and update these man pages. I did an initial review so we can start a discussion.

I'm marking the PR as a draft as it depends on #1238

Comment on lines -75 to +76
This field may be empty, in which case no passwords are
required to authenticate as the specified login name.
However, some applications which read the
<filename>/etc/shadow</filename> file may decide not to permit
any access at all if the password field is empty.
This field may be empty, in which case
no passwords are required to authenticate with the specified login name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hallyn , I'm not native. What sounds better to you? 'as' or 'with'?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'as'

that the password is locked. The remaining characters on the
that the password is locked. The remaining characters on the
Copy link
Collaborator

@alejandro-colomar alejandro-colomar Mar 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @domiborges !

This is a contentious thing. The correct amount of inter-sentence space is two. See some history about this:
https://web.archive.org/web/20171217060354/http://www.heracliteanriver.com/?p=324.

Don't let others lie to you about it; one space is wrong. :-)

TL;DR: editorial companies moved from two spaces to one space to reduce costs, by being able to hire less experienced editors.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand, semantic newlines preclude this at all. After period, one should start a new source line.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Linux man-pages project, we have two spaces as a rule, for commit messages (in the source code of manual pages we don't need this rule, due to semantic newlines).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, two spaces.

@alejandro-colomar
Copy link
Collaborator

alejandro-colomar commented Mar 23, 2025

I have applied your first two patches into my PR. I've signed them on your behalf (with some minor tweaks too). Thanks!

The rest still need some review.

Copy link
Collaborator

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments inline

Comment on lines +87 to 91
<para>
Passing the value <emphasis>-1</emphasis> or an empty string
as the <replaceable>LAST_DAY</replaceable>
clears the value and removes the password change requirement.
</para>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hallyn and @alejandro-colomar does it make sense to empty the last changed date?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it's useful for anything. A dummy value of 0 would serve the same purpose I guess.

Are you considering removal of the feature?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just trying to understand whether it makes sense. Even though the functionality was there the man page didn't explain it, so probably many users weren't aware of it.

Copy link
Collaborator

@alejandro-colomar alejandro-colomar Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense. We must support a shadow file without the value, and new users have an empty value, so it makes sense that someone may want to reset a user back to "factory settings", and to do so, they'll want to remove it. However, I think we don't need two ways to specify that. An empty string would be enough. IMO, -1 should be a valid date referring to the day before Epoch.

Passing the number <emphasis remap='I'>-1</emphasis> as the
<replaceable>EXPIRE_DATE</replaceable> will remove an account
expiration date.
Passing the value <emphasis remap='I'>-1</emphasis>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or an empty string

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I will also amend this in the patch I've picked into my PR.

Comment on lines +79 to +82
The user is first prompted for their old password, if one is present.
This password is then encrypted and compared with the stored password.
The user has only one attempt to enter the correct password.
The superuser can bypass this step to allow changing forgotten passwords.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation error

Comment on lines +99 to +102
Then, the password is tested for complexity.
<command>passwd</command> rejects any password that does not meet
the required complexity.
Do not to include the system default erase or kill characters.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation error

age where the user is expected to replace this password. See <citerefentry>
<refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>for more information.
Defines the number of days after a password exceeds its maximum age
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation error

Comment on lines -183 to 184
The date on which the user account will be disabled. The date is
Sets the date on which the user account will be disabled. The date must be
specified in the format <emphasis remap='I'>YYYY-MM-DD</emphasis>.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useradd and usermod accept the same input values as chage for expiredate. I'd recommend you to use the same text here.

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.

4 participants