Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

usermod: -r/--remove is not accepted

Đang mở
#368 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@jayhemnani9910 đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #370 của @jayhemnani9910 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
linux, rust
Lĩnh vực
authentication, cli

Hướng nghiên cứu

Start with the usermod argument parsing and group update paths; the issue does not name files or tests, so locate them from the usermod entry point. Check how -G updates memberships in /etc/group and /etc/gshadow, then compare behavior for -rG, -r alone, and -r with -a against the GNU behavior described. Done means the flag removes only the specified group memberships and invalid combinations exit with status 2.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

GNU usermod 4.17 has -r, --remove to take the user out of only the groups given with -G. shadow-rs rejects it:

# usermod -rG daemon u1
error: unexpected argument '-r' found

exit 2, and the user stays in daemon. GNU removes u1 from daemon in /etc/group and /etc/gshadow and leaves its other groups alone. -r without -G and -r with -a are usage errors there (exit 2).

I have a change that adds the flag; happy to open a PR.

GNU shadow 4.17.4 (Ubuntu 26.04). shadow-rs main 1b2d8de.

Ngôn ngữ chính
Rust
Star
17
Fork
10
Merge trung bình
19 giờ 18 phút
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của uutils/shadow

Tất cả issue của uutils/shadow

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.