linux 修改用户登录密码
生活随笔
收集整理的這篇文章主要介紹了
linux 修改用户登录密码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
系統:ubuntu18.04.5
1.打開一個終端,輸入 sudo su 轉為root用戶。 (必須轉為root用戶, $ 代表用戶 # 代表 root用戶)
2.sudo passwd user (user 是對應的用戶名)
3.輸入新密碼,確認密碼。
4.修改密碼成功,
5.exit退出root,
6.reboot 重啟
用戶切換root用戶
sudo suroot用戶轉為普通用戶
su user # user為用戶名當我們切換為普通用戶reboot重啟時會報錯
User root is logged in on pts/0. Please retry operation after closing inhibitors and logging out other users. Alternatively, ignore inhibitors and users with 'systemctl reboot -i'. # root用戶在pts/0上登錄。 # 請在關閉抑制劑和注銷其他用戶后重試操作。 # 或者,忽略使用'systemctl reboot -i'的抑制劑和用戶。輸入systemctl reboot -i 在輸入密碼即可
總結
以上是生活随笔為你收集整理的linux 修改用户登录密码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java writedouble_Jav
- 下一篇: linux 其他常用命令