zoukankan      html  css  js  c++  java
  • CentOS7一些设置

    1.CentOS系统中,使用默认创建的用户执行sudo命令时终端提示以下信息:

    tom is not in the sudoers file. This incident will be reported.
    

    原因是CentOS默认创建的用户并没有sudo命令的执行权限,而且CentOS中也并不存在sudo用户组。
    提示信息中提到的sudoers file位于/etc/sudoers,使用root权限可对其进行修改,命令如下:

    su root
    vim /etc/sudoers
                     ...
                     ...
                     ...
    ## Allow root to run any commands anywhere
    root    ALL=(ALL)       ALL
    tom     ALL=(ALL)       ALL
                     ...
                     ...
                     ...
    

    2.CentOS7在登录界面用户列表中隐藏指定账号

    CentOS中有多个账户,不想禁用用户列表,也不想全显示,使用root权限修改对应用户文件,命令如下:

    vim /var/lib/AccountsService/users/<username> 
    [User]
    Language=zh_CN.utf8
    XSession=
    SystemAccount=true
    

    3.CentOS7修改开机等待时间

    使用root用户权限修改grub.cfg文件,命令如下:

    vim /boot/grub2/grub.cfg
                     ...
                     ...
                     ...
    terminal_output console
    if [ x$feature_timeout_style = xy ] ; then
      set timeout_style=menu
      set timeout=1 # 建议改成1秒钟
    # Fallback normal timeout code in case the timeout_style feature is
    # unavailable.
    else
      set timeout=1
    fi
                     ...
                     ...
                     ...
    
  • 相关阅读:
    教你怎么叠T恤
    最动人的情歌《The Power of Love》by Celine.Dion
    使代码简洁的 5 条忠告
    Timeout MessageBox
    内联函数
    局部对象
    const用法(转)
    心情
    内联函数
    局部对象
  • 原文地址:https://www.cnblogs.com/reggieqiao/p/13474898.html
Copyright © 2011-2022 走看看