![redhat linux cheat sheet redhat linux cheat sheet](https://access.redhat.com/sites/default/files/images/rh_sm_command_cheatsheet_1214_jcs_web2.1-ja.png)
Specify a particular login shell for the user account. Move the user's home directory to a new location. Specify a particular home directory for the user account. Used with the -G option to add the supplementary groups to the user's current set of groups.
![redhat linux cheat sheet redhat linux cheat sheet](https://image.slidesharecdn.com/redhat-lvmcheatsheet-150812163235-lva1-app6891/95/red-hat-lvm-cheatsheet-2-638.jpg)
Specify a comma-separated list of supplementary groups for the user account. Specify the primary group for the user account. Use the following command to display basic options that can be used to modify an accountĪdd the user's real name to the comment field. Run the following command to display basic options with useradd command
REDHAT LINUX CHEAT SHEET PASSWORD
At this point, cannot log in until a password is set. The following command creates a user named username. User01 ALL=(ALL) NOPASSWD:ALL Managing Local Users Creating Users It is also possible to set up sudo to allow a user to run commands as another user without entering their password:
REDHAT LINUX CHEAT SHEET FULL
To enable full sudo access for the group group01, you could create /etc/sudoers.d/group01 with the following content: To enable full sudo access for the user user01, you could create /etc/sudoers.d/user01 with the following content:
![redhat linux cheat sheet redhat linux cheat sheet](https://i.pinimg.com/originals/6f/19/12/6f1912ac77b4f3f1a121b23f5baeed6e.png)
It is possible gain superuser previliges using sudo command instead of logging into root user. Note: the - (dash option) sets up the shell environment to the target user. Note: if user is ommited, the su command will switch to root user by default. The su - command allows users to switch to a different account. The id command displays information about a user.īy defaults, users are stored in /etc/passwd file. $ ls -l /usr/bin | less Pipes with tee Command Redirect stdout and stderr to append to the same file Redirect stdout and stderr to overwrite the same file $ ln -s /home/user/newfile-link2.txt /tmp/newfile-symlink.txtĬreating, Viewing, and Editing Text Files Redirecting Output to a File or Program Usageĭiscard stderr error messages by redirecting to /dev/null $ ln newfile.txt /tmp/newfile-hlink2.txt Soft Links Note: is created by ln command and shouldn't exist beforehand Managing Files from CLI Command-line File Management Activity