Skip to content

IT Diaries

Cloud & Security

Month: February 2017

Posted on February 7, 2017

CentOS 7.2 reset root account password

Hello all,

Although not being a daily operation, you might need to reset the password of root account on some occasions. Here are the steps:

Restart the operating system and press e when prompted.

Move cursor to linux16 line and remove rhgb and quite , add rd.break enforcing=0  as shown below.

Proceed with pressing Ctrl+x in order to access the initramfs(initial RAM file system) that gets loaded into memory during the startup process. Rest of the process is so straight forward. Perform the commands those are written below.

mount -o remount,rw /sysroot
chroot /sysroot
passwd (type the_password_you_want_set twice after hitting “enter” )
exit
mount -o remount,ro /sysroot
exit

When you reach out to login screen, login through root by the typing new password and run the followings.
restorecon /etc/shadow
setenforce 1

Mission accomplished successfully 🙂 If you take some “hands-on” certification exams, you probably are not given the “root” account password and you are entailed to reset it. Keep those steps in your mind just in case.

Wish you the best.

Categories

  • Bilişim Günlükleri (94)
  • Cloud (65)
  • DevOps SysOps Coding (24)
  • Diğer (20)
  • Linux (11)
  • Microsoft Office Products (59)
  • Microsoft OS&Platform (67)
  • Power Shell (11)
  • Security (51)
  • Symantec (56)
  • Uncategorized (1)
  • Üniversite Seminerlerimiz (14)
  • Video (8)

Recent Posts

  • Python – useful string methods
  • Python – Valid character list
  • Python – Average word count 2
  • Python – Error Handling 2
  • Python – Error Handling 1
  • Python – Average word count
  • Python – get current date
  • Python – Let’s count a word in a string
  • Python- multiplication / time table
  • Python – ord() and chr() functions
  • Python – guess hidden number
  • Openstack ile alıştırmalar 6
  • Openstack ile alıştırmalar 5
  • Openstack ile alıştırmalar 4
  • Openstack ile alıştırmalar 3
  • Openstack ile alıştırmalar 2
  • Openstack ile alıştırmalar 1
  • AWS – WP Polly Plugin Türkçe İçerik
  • AWS – WP Polly Plugin
  • Big Data – Azure RDB servisi ile çalışmak
  • Big Data – Azure Data Lake Store ile çalışalım
  • Liste işlemleri append()-remove()-pop()
  • Kelimelere ayıralım ve sonuncu space ‘i düşünelim :)
  • Text içinde string aramak .find( )
  • Python – sözlükler ve bazı fonksiyonlar
  • Python – listeler ve bazı fonksiyonlar
  • Python – string’ler ve bazı fonksiyonlar
  • Python – numaralar ve bazı fonksiyonlar
  • Azure IoT – Raspberry PI’ i IoT Hub’a bağlayalım
  • Azure IoT – Mesajın Table Storage’e Kaydedilmesi

Archives

  • September 2018 (11)
  • April 2018 (6)
  • February 2018 (2)
  • November 2017 (2)
  • August 2017 (3)
  • July 2017 (4)
  • June 2017 (6)
  • May 2017 (1)
  • April 2017 (1)
  • March 2017 (1)
  • February 2017 (1)
  • January 2017 (1)
  • December 2016 (1)
  • November 2016 (2)
  • October 2016 (1)
  • August 2016 (1)
  • July 2016 (1)
  • June 2016 (1)
  • May 2016 (5)
  • April 2016 (1)
  • March 2016 (2)
  • February 2016 (1)
  • January 2016 (2)
  • December 2015 (2)
  • November 2015 (1)
  • October 2015 (2)
  • September 2015 (2)
  • August 2015 (3)
  • July 2015 (4)
  • June 2015 (3)
  • May 2015 (6)
  • April 2015 (4)
  • March 2015 (5)
  • February 2015 (3)
  • January 2015 (2)
  • December 2014 (3)
  • November 2014 (2)
  • October 2014 (2)
  • September 2014 (10)
  • August 2014 (4)
  • July 2014 (3)
  • June 2014 (8)
  • May 2014 (5)
  • April 2014 (7)
  • March 2014 (5)
  • February 2014 (5)
  • January 2014 (13)
  • December 2013 (8)
  • November 2013 (7)
  • October 2013 (5)
  • September 2013 (6)
  • August 2013 (3)
  • July 2013 (3)
  • June 2013 (7)
  • May 2013 (10)
  • April 2013 (10)
  • March 2013 (15)
  • February 2013 (9)
  • January 2013 (8)
  • December 2012 (17)
  • November 2012 (8)
  • October 2012 (8)
  • September 2012 (4)
  • August 2012 (4)
  • July 2012 (5)
  • June 2012 (9)
  • May 2012 (4)
  • April 2012 (13)
  • March 2012 (11)
  • February 2012 (13)
  • January 2012 (15)
  • December 2011 (12)
  • November 2011 (4)
  • October 2011 (5)
  • September 2011 (15)
  • August 2011 (9)
  • June 2011 (1)
  • May 2011 (3)
  • March 2011 (1)
  • May 2010 (2)
  • April 2010 (2)
  • March 2010 (4)
  • February 2010 (1)
  • December 2009 (3)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Proudly powered by WordPress