centos开启sudo免密

visudo
在root后加一行

用户名 ALL=(ALL) NOPASSWD:ALL

root1用户可以直接切root了。

posted on 2023-09-29 12:12  王景迁  阅读(174)  评论(0编辑  收藏  举报

导航