From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Log in and switch users in multiuser targets
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
Log in and switch users in multiuser targets
- [Instructor] We have the option to log in as a different user in Linux but there are times where we might want to switch to a different user temporarily. Usually we do this when we went to elevate our privileges to root to run a command or access a resource. There's an easy way of telling who you are currently. For this we can use the who am I command. Type in who am I and hit enter. And it says I'm user1. Who am I very simply prints out which user I'm logged in as. We have another command called log name which at first glance, looks identical to who am I. If we view the man pages for both we may be left confused. Type in log name and hit enter. Let me explain the differences. When we log in as a user, we are that user. We can however use the SU command to effectively switch to a new user. For instance, to switch to root we type in SU space root and hit enter, and then enter a root's password. Notice our prompt now says we're root. If we type in who am I, it says we're root. Now…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Create and delete local user accounts5m 59s
-
(Locked)
Modify local user accounts5m 28s
-
(Locked)
Change passwords and adjust password aging for local user accounts4m 40s
-
(Locked)
Manage aging for local user accounts5m 45s
-
(Locked)
Create, delete, and modify local groups and group memberships5m 41s
-
(Locked)
Log in and switch users in multiuser targets2m 17s
-
(Locked)
Elevating privileges using sudo3m 28s
-
(Locked)
Challenge: Users and accounts1m 31s
-
(Locked)
Solution: Users and accounts2m 49s
-
-
-
-
-
-
-