useradd, groupadd, the wheel group and sudo
Sign in to read this lesson
User management on RHEL is very similar to Ubuntu, but a few differences come up often in the exam and at work — the wheel group, useradd's default behaviour, choosing UIDs and groups. In this lesson we set up an admin account, a service account, a shared group and limited sudo rights with sudoers.d.
What you will learn
- On RHEL
useraddcreates the home directory automatically (CREATE_HOME yesin/etc/login.defs); Ubuntu's-mis not needed. - sudo rights come from the wheel group:
useradd -G wheel ops1orusermod -aG wheel ali. -uUID,-gprimary group,-Gsupplementary groups,-s /sbin/nologina service account without login,-ccomment.- For limited rights, use a file in
/etc/sudoers.d/and alwaysvisudo -f. id,getent passwd,getent group— checking;userdel -rdeletes with the home directory.
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.