rh124_account_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rh124_account_management [2026/10/19 19:33] – [Deleting users] rpjdayrh124_account_management [2026/10/19 20:02] (current) – [Changing someone's password] rpjday
Line 290: Line 290:
 <code> <code>
 $ passwd user0 $ passwd user0
 +</code>
 +
 +Note ''%%--stdin%%'' option to set password:
 +
 +<code>
 +$ passwd --help
 +Usage: passwd [options] [LOGIN]
 +
 +Options:
 +  -a, --all                     report password status on all accounts
 +  -d, --delete                  delete the password for the named account
 +  -e, --expire                  force expire the password for the named account
 +  -h, --help                    display this help message and exit
 +  -k, --keep-tokens             change password only if expired
 +  -i, --inactive INACTIVE       set password inactive after expiration
 +                                to INACTIVE
 +  -l, --lock                    lock the password of the named account
 +  -n, --mindays MIN_DAYS        set minimum number of days before password
 +                                change to MIN_DAYS
 +  -q, --quiet                   quiet mode
 +  -r, --repository REPOSITORY   change password in REPOSITORY repository
 +  -R, --root CHROOT_DIR         directory to chroot into
 +  -P, --prefix PREFIX_DIR       directory prefix
 +  -S, --status                  report password status on the named account
 +  -u, --unlock                  unlock the password of the named account
 +  -w, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS
 +  -x, --maxdays MAX_DAYS        set maximum number of days before password
 +                                change to MAX_DAYS
 +  -s, --stdin                   read new token from stdin
 +</code>
 +
 +<code>
 +$ echo "password" | passwd --stdin user0
 </code> </code>
  
Line 442: Line 475:
   -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files   -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files
   -f, --force                   delete group even if it is the primary group of a user   -f, --force                   delete group even if it is the primary group of a user
 +</code>
 +
 +==== groupmems ====
 +
 +<code>
 +$ groupmems --help
 +Usage: groupmems [options] [action]
 +
 +Options:
 +  -g, --group groupname         change groupname instead of the user's group
 +                                (root only)
 +  -R, --root CHROOT_DIR         directory to chroot into
 +
 +Actions:
 +  -a, --add username            add username to the members of the group
 +  -d, --delete username         remove username from the members of the group
 +  -h, --help                    display this help message and exit
 +  -p, --purge                   purge all members from the group
 +  -l, --list                    list the members of the group
 +</code>
 +
 +===== Giving someone superuser access =====
 +
 +First, add them to the ''wheel'' group so they can use the ''sudo'' command; they will still have to type their password.
 +
 +<code>
 +$ usermod -aG wheel user1
 +</code>
 +
 +In addition, add this line to either ''/etc/sudoers'' or a file under ''/etc/sudoers.d'':
 +
 +<code>
 +user1 ALL=(ALL) NOPASSWD: ALL
 </code> </code>
  
  
  • rh124_account_management.1792438423.txt.gz
  • Last modified: 2026/10/19 19:33
  • by rpjday