我正在尝试以 身份通过 ssh 进入 Ubuntu 20.04 VM user
。但是,在访问机器后,如果我运行,whoami
我会得到root
。如果我尝试su user
提供密码,我仍然是root
。
sig$ ssh [email protected]
[email protected]'s password:
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Tue Sep 22 09:47:13 CEST 2020
System load: 0.96 Processes: 144
Usage of /: 27.7% of 23.99GB Users logged in: 0
Memory usage: 19% IPv4 address for docker0: 172.18.0.1
Swap usage: 0% IPv4 address for eth0: 10.0.7.444
* Kubernetes 1.19 is out! Get it in one command with:
sudo snap install microk8s --channel=1.19 --classic
https://microk8s.io/ has docs and details.
0 updates can be installed immediately.
0 of these updates are security updates.
Last login: Tue Sep 22 09:43:13 2020 from 194.161.123.245
-bash-5.0$ who -H
NAME LINE TIME COMMENT
user pts/0 2020-09-22 09:47 (194.161.123.245)
-bash-5.0$ users
user
-bash-5.0$ whoami
root
-bash-5.0$ passwd user
Changing password for user.
Current password:
passwd: Authentication token manipulation error
passwd: password unchanged
-bash-5.0$ su user
Password:
bash-5.0$ whoami
root
我在这里遗漏了什么?为什么我没有遗漏user
?
- 更新 -
以下ids
:
-bash-5.0$ id
uid=1000(user) gid=1000(user) euid=0(root) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd),998(docker)
-bash-5.0$ id user
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd),998(docker)
-bash-5.0$ id root
uid=0(root) gid=0(root) groups=0(root)