<!DOCTYPE html>
    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
    <head>
<title>Cách reset mật khẩu root đã quên trong Ubuntu 24.04</title>
<meta name="description" content="Cách reset mật khẩu root đã quên trong Ubuntu 24.04 - Savefile - Tin Tức -...">
<meta name="author" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :.">
<meta name="copyright" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :. [admin@nguoicodonvn2008.info]">
<meta name="robots" content="index, archive, follow, noodp">
<meta name="googlebot" content="index,archive,follow,noodp">
<meta name="msnbot" content="all,index,follow">
<meta name="generator" content="NukeViet v4.5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Cách reset mật khẩu root đã quên trong Ubuntu 24.04">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;www.nguoicodonvn2008.info&#x002F;vi&#x002F;news&#x002F;savefile&#x002F;kien-thuc-may-tinh&#x002F;cach-reset-mat-khau-root-da-quen-trong-ubuntu-24-04-11002.html">
<meta property="og:site_name" content=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.">
<meta property="og:url" content="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-reset-mat-khau-root-da-quen-trong-ubuntu-24-04-11002.html">
<link rel="shortcut icon" href="https://nguoicodonvn2008.info/favicon.ico">
<link rel="canonical" href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-reset-mat-khau-root-da-quen-trong-ubuntu-24-04-11002.html">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/" title="Tin Tức" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/karaoke-dual/" title="Tin Tức - Karaoke Dual" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/nhac-tre/" title="Tin Tức - Nhạc trẻ" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tru-tinh/" title="Tin Tức - Trữ tình" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/nuoc-ngoai/" title="Tin Tức - Nước ngoài" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/remix/" title="Tin Tức - Remix" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tam-su-tinh-yeu/" title="Tin Tức - Tâm sự tình yêu" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tho-suu-tam/" title="Tin Tức - Thơ sưu tầm" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/cuoc-song/" title="Tin Tức - Cuộc sống" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/phan-mem/" title="Tin Tức - Phần mềm" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/kien-thuc-may-tinh/" title="Tin Tức - Kiến thức máy tính" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/hoc-tap/" title="Tin Tức - Học tập" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tai-lieu/" title="Tin Tức - Tài liệu" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/de-thi/" title="Tin Tức - Đề thi" type="application/rss+xml">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/assets/css/font-awesome.min.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/style.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/style.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/news.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/custom.css" type="text/css">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/jquery/jquery.min.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/language/vi.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/global.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/site.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/news.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/main.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/custom.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/bootstrap.min.js" type="text/javascript">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/style.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://nguoicodonvn2008.info/themes/default/css/news.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/custom.css">
<style type="text/css">
	body{background: #fff;}
</style>
    </head>
    <body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">.&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.</h2>
		<p class="pull-right"><a title=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;." href="https://nguoicodonvn2008.info/">https://nguoicodonvn2008.info</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Cách reset mật khẩu root đã quên trong Ubuntu 24.04</h1>
		<ul class="list-inline">
			<li>Chủ nhật - 24/08/2025 23:12</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
		</div>
				<div class="imghome">
			<img alt="Cách reset mật khẩu root đã quên trong Ubuntu 24.04" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-11.jpg" width="460" class="img-thumbnail" />
		</div>
		<div class="clear"></div>
		<div id="bodytext" class="clearfix">
			<p style="text-align: justify;">Trên các hệ thống chạy trên Linux, tài khoản root nắm giữ cấp độ quyền cao nhất trong hệ thống phân cấp vai trò người dùng. Người dùng&nbsp;<a data-type="internal" href="https://quantrimang.com/cong-nghe/cach-tro-thanh-root-trong-linux-170876" title="Root là gì? Làm sao để trở thành root trong Linux?">root</a>&nbsp;có toàn quyền kiểm soát hệ thống, bao gồm khả năng sửa đổi và ghi đè quyền của người dùng khác. Thông thường, người dùng phải có quyền của người dùng root để thực hiện bất kỳ thay đổi nào trên hệ thống.</p>

<div style="text-align: justify;">&nbsp;</div>

<p style="text-align: justify;">Trong các hệ thống&nbsp;Ubuntu, tài khoản root ban đầu bị vô hiệu hóa theo mặc định. Tuy nhiên, người dùng vẫn có thể thực hiện các thay đổi cần thiết nếu họ có quyền truy cập vào mật khẩu root. Vấn đề phát sinh khi quên mật khẩu root. Bài viết này sẽ hướng dẫn bạn quy trình reset mật khẩu root trên hệ thống Ubuntu 24.04 bằng cách thay đổi cấu hình Grub boot loader và khởi động Ubuntu ở chế độ Rescue.</p>

<h2 style="text-align: justify;">Thay đổi mật khẩu root</h2>

<p style="text-align: justify;">Để thay đổi mật khẩu root trong hệ thống, hãy mở cửa sổ terminal bằng phím tắt&nbsp;<strong>Ctrl + Alt + T</strong>. Bạn cũng có thể truy cập cửa sổ terminal bằng cách vào&nbsp;<strong>ApplicationsTerminal</strong>&nbsp;của hệ thống. Bây giờ, để thay đổi mật khẩu root, hãy nhập lệnh sau vào cửa sổ terminal.</p>

<pre id="pre0">
<code>$ sudo passwd root</code></pre>

<figure>
<div style="text-align: justify;"><img alt="" data-adbro-processed="true" data-i="0" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-1.jpg" data-was-processed="true" height="28" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-1.jpg" width="552" /></div>
</figure>

<p style="text-align: justify;">Hệ thống sẽ nhắc người dùng nhập mật khẩu mới mà họ muốn thiết lập. Sau đó, khi bạn nhấn phím&nbsp;<strong>&lt;enter&gt;</strong>, hệ thống sẽ nhắc người dùng nhập lại mật khẩu mới một lần nữa vào trường&nbsp;<strong>Retype new password</strong>.</p>

<figure>
<div style="text-align: justify;"><img alt="Nhập mật khẩu" data-i="1" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-2.jpg" data-was-processed="true" height="86" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-2.jpg" width="578" /></div>

<figcaption>
<div style="text-align: justify;">Nhập mật khẩu</div>
</figcaption>
</figure>

<p style="text-align: justify;">Khi bạn nhấn phím&nbsp;<strong>&lt;enter&gt;</strong>&nbsp;trên bàn phím, mật khẩu sẽ được cập nhật thành công.</p>

<figure>
<div style="text-align: justify;"><img alt="Đã thay đổi mật khẩu thành công" data-i="2" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-3.jpg" data-was-processed="true" height="108" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-3.jpg" width="626" /></div>

<figcaption>
<div style="text-align: justify;">Đã thay đổi mật khẩu thành công</div>
</figcaption>
</figure>

<h2 style="text-align: justify;">Reset mật khẩu root</h2>

<p style="text-align: justify;">Khi người dùng quên mật khẩu root, họ cần nhập mật khẩu của người dùng.</p>

<h3 style="text-align: justify;">Bước 1: Khởi động vào chế độ Recovery</h3>

<p style="text-align: justify;">Để bắt đầu với phương pháp này, người dùng cần khởi động lại hệ thống. Nhấn phím&nbsp;<strong>&lt;shift&gt;</strong>&nbsp;trên bàn phím ngay khi màn hình khởi động xuất hiện. Màn hình GNU GRUB sẽ xuất hiện như hình dưới đây:</p>

<figure>
<div style="text-align: justify;"><img alt="Màn hình khởi động Grub" data-i="3" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-4.jpg" data-was-processed="true" height="524" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-4.jpg" width="768" /></div>

<figcaption>
<div style="text-align: justify;">Màn hình khởi động Grub</div>
</figcaption>
</figure>

<p style="text-align: justify;">Đây là menu khởi động của Ubuntu, hiển thị các phiên bản kernel và những tùy chọn khác nhau. Chọn tùy chọn&nbsp;<strong>Ubuntu</strong>&nbsp;bằng cách nhấn phím&nbsp;<strong>&lt;enter&gt;</strong>. Khi chọn Ubuntu, bạn cần nhấn phím&nbsp;<strong>&quot;e&quot;</strong>&nbsp;để mở các tham số grub cần chỉnh sửa.</p>

<figure>
<div style="text-align: justify;"><img alt="Tham số khởi động" data-i="4" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-5.jpg" data-was-processed="true" height="562" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-5.jpg" width="768" /></div>

<figcaption>
<div style="text-align: justify;">Tham số khởi động</div>
</figcaption>
</figure>

<h3 style="text-align: justify;">Bước 2: Thay đổi cấu hình</h3>

<p style="text-align: justify;">Sau đó, sử dụng các phím mũi tên một lần nữa và cuộn xuống dòng cuối cùng bắt đầu bằng từ khóa &quot;Linux/boot/vmlinuz&quot;.</p>

<figure>
<div style="text-align: justify;"><img alt="Thay đổi cấu hình" data-i="5" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-6.jpg" data-was-processed="true" height="564" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-6.jpg" width="768" /></div>

<figcaption>
<div style="text-align: justify;">Thay đổi cấu hình</div>
</figcaption>
</figure>

<p style="text-align: justify;">Từ dòng được hghlight ở trên, bạn cần thay thế từ&nbsp;<strong>&quot;ro quiet splash $vt_handoff&quot;</strong>&nbsp;bằng&nbsp;<strong>&quot;rw init=/bin/bash&quot;</strong>.</p>

<figure>
<div style="text-align: justify;"><img alt="Khởi động vào bash shell" data-i="6" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-7.jpg" data-was-processed="true" height="556" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-7.jpg" width="768" /></div>

<figcaption>
<div style="text-align: justify;">Khởi động vào bash shell</div>
</figcaption>
</figure>

<h3 style="text-align: justify;">Bước 3: Khởi động lại hệ thống</h3>

<p style="text-align: justify;">Bước tiếp theo là khởi động lại hệ thống. Bạn có thể thực hiện thao tác này bằng cách sử dụng phím&nbsp;<strong>Ctrl + X</strong>&nbsp;hoặc phím&nbsp;<strong>F10</strong>. Thao tác này sẽ giúp bạn khởi động lại hệ thống cùng với các bản cập nhật đã thực hiện. Hệ thống sẽ khởi động lại và bạn sẽ được đưa đến root shell. Shell sẽ chỉ xuất hiện một lần, và sau đó sẽ xuất hiện bình thường.</p>

<p style="text-align: justify;">Để kiểm tra xem hệ thống file gốc của bạn đã được mount đúng cách chưa, hãy thêm lệnh sau vào shell.</p>

<pre id="pre1">
<code>$ mount | grep -w /</code></pre>

<figure>
<div style="text-align: justify;"><img alt="Tìm kiếm mountpoint" data-i="7" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-8.jpg" data-was-processed="true" height="62" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-8.jpg" width="734" /></div>

<figcaption>
<div style="text-align: justify;">Tìm kiếm mountpoint</div>
</figcaption>
</figure>

<h3 style="text-align: justify;">Bước 4: Thay đổi mật khẩu root</h3>

<p style="text-align: justify;">Để thay đổi mật khẩu root, hãy nhập lệnh password sau:</p>

<pre id="pre2">
<code>$ passwd</code></pre>

<figure>
<div style="text-align: justify;"><img alt="Thiết lập mật khẩu" data-i="8" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-9.jpg" data-was-processed="true" height="28" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-9.jpg" width="450" /></div>

<figcaption>
<div style="text-align: justify;">Thiết lập mật khẩu</div>
</figcaption>
</figure>

<p style="text-align: justify;">Sau đó, hệ thống sẽ nhắc bạn nhập mật khẩu mới và sau khi bạn nhấn phím&nbsp;<strong>enter</strong>, hệ thống sẽ yêu cầu bạn nhập lại mật khẩu.</p>

<figure>
<div style="text-align: justify;"><img alt="Nhập lại mật khẩu" data-i="9" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-10.jpg" data-was-processed="true" height="92" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-10.jpg" width="584" /></div>

<figcaption>
<div style="text-align: justify;">Nhập lại mật khẩu</div>
</figcaption>
</figure>

<p style="text-align: justify;">Sau khi mật khẩu được cập nhật, thông báo thành công sẽ xuất hiện trên màn hình.</p>

<figure>
<div style="text-align: justify;"><img alt="Đã cập nhật mật khẩu thành công" data-i="10" data-src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-11.jpg" data-was-processed="true" height="124" src="https://st.quantrimang.com/photos/image/2025/08/08/reset-mat-khau-root-trong-ubuntu-11.jpg" width="742" /></div>

<figcaption>
<div style="text-align: justify;">Đã cập nhật mật khẩu thành công</div>
</figcaption>
</figure>

<p style="text-align: justify;">Mật khẩu hiện đã được thay đổi/reset thành công. Để xác nhận cập nhật, bạn có thể khởi động lại hệ thống.</p>

<p style="text-align: justify;">Trong bài viết này, chúng ta đã tìm hiểu cách reset mật khẩu root trên hệ thống Ubuntu 24.04. Việc quên mật khẩu không còn là vấn đề nữa vì bạn có thể dễ dàng làm theo phương pháp này để cập nhật và reset mật khẩu root.</p>

<div style="text-align: justify;">&nbsp;</div>
		</div>
				<div id="author">
						<p>
				<strong>Nguồn tin:</strong>
				Quantrimang.com:
			</p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-reset-mat-khau-root-da-quen-trong-ubuntu-24-04-11002.html" title="Cách reset mật khẩu root đã quên trong Ubuntu 24.04">https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-reset-mat-khau-root-da-quen-trong-ubuntu-24-04-11002.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; .&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.
		</div>
		<div id="contact">
			<a href="mailto:admin@nguoicodonvn2008.info">admin@nguoicodonvn2008.info</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://nguoicodonvn2008.info/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
		</script>
		<div class="car-top">
  <span><img src="https://nguoicodonvn2008.info/themes/default/images/car.png" alt=""></span>
</div>
<div id="run_cronjobs" style="visibility:hidden;display:none;"><img alt="cron" src="/index.php?second=cronjobs&amp;p=g9lQwlSz" width="1" height="1" /></div>
<script src="https://nguoicodonvn2008.info/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=-4,nv_my_abbr="EDT",nv_cookie_prefix="nv4c_e856T",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_recaptcha_ver=2,nv_recaptcha_sitekey="",nv_recaptcha_type="image",XSSsanitize=1;</script>
<script src="https://nguoicodonvn2008.info/assets/js/language/vi.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/global.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/site.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/news.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/main.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/custom.js"></script>
<script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Organization",
            "url": "https://nguoicodonvn2008.info",
            "logo": "https://nguoicodonvn2008.info/uploads/angel.gif"
        }
        </script>
<script src="https://nguoicodonvn2008.info/themes/default/js/bootstrap.min.js"></script>
<script type="text/javascript">
var $scrolltop = $('.car-top');
$scrolltop.on('click', function () {
    $('html,body').animate({
        scrollTop: 0
    }, 800);
    $(this).addClass("car-run");
    setTimeout(function(){ $scrolltop.removeClass('car-run');}, 1000);
    return false;
});
$(window).on('scroll', function ()
{ 
    if($(window).scrollTop() >= 200)
    {
        $scrolltop.addClass("show");
        $scrolltop.addClass("car-down");
    }
    else
    {
       $scrolltop.removeClass("show");
       setTimeout(function(){ $scrolltop.removeClass('car-down');}, 300);
    }
});
</script>
</body>
</html>