Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 62 discussion

Actual exam question from RedHat's EX200
Question #: 62
Topic #: 1
[All EX200 Questions]

SIMULATION -
You are new System Administrator and from now you are going to handle the system and your main task is Network monitoring, Backup and Restore. But you don't know the root password. Change the root password to redhat and login in default Runlevel.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
When you Boot the System, it starts on default Runlevel specified in /etc/inittab:
Id:?:initdefault:
When System Successfully boot, it will ask for username and password. But you don't know the root's password. To change the root password you need to boot the system into single user mode. You can pass the kernel arguments from the boot loader.
1. Restart the System.
2. You will get the boot loader GRUB screen.
3. Press a and type 1 or s for single mode ro root=LABEL=/ rhgb queit s
4. System will boot on Single User mode.
5. Use passwd command to change.
6. Press ctrl+d

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
adolfoale
Highly Voted 3 years, 8 months ago
In RHEL8 - reboot the system - press "e" letter - Add "rd.break" at the end of de line thet begening with "Linux" in grub menu - ctrl + x - # mount -o remount,rw /sysroot - # chroot /sysroot - # passwd - #  touch /.autorelabel - # exit - # logout
upvoted 28 times
urWaifu
2 years ago
Know this by heart, because you won't be able to log in on the second server during the exam.
upvoted 3 times
...
...
MisterR0B0T
Most Recent 1 month ago
# Restart the System. # When the boot-loader menu appears, press any key to interrupt the countdown, except Enter. # - press "e" letter to edit # - Remove any console= options from the line. # 1 Add init=/bin/bash ...at the end of the line that begins with "Linux" in grub menu(ctrl e) # 2 crtl x ----bash-5.1#. # 3 mount -o remount,rw / # 4 ls -lZ /etc/shadow (note this dir system_u:object...) # 5 passwd redhat redhat # 6 chcon system_u:object... /etc/shadow # 7 exec /sbin/init
upvoted 1 times
...
ly01
3 months ago
You can also do: interrupt boot and add init=/bin/bash as kernel argument mount -o remount,rw / whoami passwd touch /.autorelabel exec /lib/systemd/systemd
upvoted 2 times
...
syed2020
2 years, 2 months ago
In RHEL 9 - Reboot the system - Press 'e' and modify line starting with Linux with rw and add init=/bin/bash - Press F10 - Enter passwd to reset root passwrod - touch /autorelable - exec /sbin/init
upvoted 2 times
...
STFN2019
3 years ago
You can also do the following (slight variation to adolfoale's solution): - Reboot - At GRUB2 press e for the primary (default) kernel - Replace ro with rw init=/sysroot/bin/sh - Ctrl+X - chroot /sysroot - passwd root - Enter the password - touch /.autorelabel - Exit - Reboot
upvoted 1 times
...
Ares23
3 years, 4 months ago
the "touch /.autorelabel" is needed if SELinux is enabled/enforced !! if you don't create it password not be update
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...