chage -E, usermod -e: dates other than YYYY-MM-DD are rejected
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
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
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/shadow
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
pwck: warnings and "no changes" on clean files, nothing after problemsPossibly taken @jayhemnani9910 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 54/100
Maintainers usually reply within 1 day
-
usermod: -u and -g exit 0 on a symlinked home, GNU exits 12Possibly taken @pierre-warnier claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
usermod: -m/--move-home is not implementedPossibly taken @jayhemnani9910 claimed this 3 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Dependency DashboardOpen
Difficulty 3/5 1-2 days Newbie friendliness 20/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
status:untriaged
Difficulty 1/5 Under an hour Newbie friendliness 72/100
midnightntwrk/midnight-zk#592 ·
Maintainers usually reply within 3 days
-
QuartoHub: have the Document name before the filename in the browser tabPossibly taken @cscheid claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/q2#930 · 1 comment ·
Maintainers usually reply within 1 day
-
muse P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
HerringtonDarkholme/hd-lang#923 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day