美文网首页
CentOS免密码切换至root

CentOS免密码切换至root

作者: jychen | 来源:发表于2017-03-04 11:36 被阅读235次

    找到su文件

    vim /etc/pam.d/su
    

    将 auth这一列的注释号 去除

    # Uncomment the following line to implicitly trust users in the "wheel" group.
    auth            sufficient      pam_wheel.so trust use_uid
    

    然后将登陆用户加入 wheel组

    usermod -G wheel {xxx}
    

    相关文章

      网友评论

          本文标题:CentOS免密码切换至root

          本文链接:https://www.haomeiwen.com/subject/avndgttx.html