Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

chage -E, usermod -e: dates other than YYYY-MM-DD are rejected

Open
#365 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start in shadow-core/src/date.rs and inspect how chage -E, usermod -e, and useradd -e parse expiration dates. Compare the current parser with the GNU date forms listed in the issue and check how uutils/parse_datetime handles them. Done means those commands accept the listed forms while preserving the existing day-count behavior and matching GNU's results.

Written by the indexing model from the issue text.

Description

chage -E and usermod -e (and useradd -e) accept only YYYY-MM-DD or a day count. GNU 4.17.4 reads the date with its general date parser, so other common forms work:

# chage -E 01/02/2030 alice
GNU:  exit 0, expire = 21916 (2030-01-02)
here: invalid date '01/02/2030' (expected YYYY-MM-DD or days since epoch), exit 2

Same for 2030/01/02, 1/2/30, 2 Jan 2030, January 2, 2030 and tomorrow, which GNU all takes; usermod -e 01/02/2030 exits 3 here. Scripts written for GNU that pass a date in one of these forms stop working.

The parsing is in shadow-core/src/date.rs. uutils/parse_datetime already reads the GNU date -d forms; would using it there be welcome? I can send a PR.

Checked on main 7a84527 in ubuntu:26.04 (GNU passwd 1:4.17.4-2ubuntu3).

Dominant language
Rust
Stars
17
Forks
10
Avg merge
18h 30m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/shadow

All issues in uutils/shadow

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.