安装ubuntu的时候没有发现有提示要设置su密码。切换到root用户时需要root密码。

ubuntu默认不启动root密码,此时系统的root密码是动态的,每次启动都不同。

启用root密码方法:

sudo passwd root

然后输入需要的root密码即可。