博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Debian 8 配置开机启动 CLI、Root用户登陆
阅读量:7084 次
发布时间:2019-06-28

本文共 2907 字,大约阅读时间需要 9 分钟。

hot3.png

CLI: command Line Interface

命令行界面:现在Linux发行版默认登陆界面几乎都是默认为GUI界面,若按照旧版本的修改inittab文件,在一些内核比较新的版本因Linux启动机制发生变化无inittab配置文件

Debian8 修改启动界面:修改启动程序grub配置文件实现

  1. 打开grup配置文件:/etc/default/grub
  2. 修改GRUB_CMDLINE_LINUX="" 为GRUB_CMDLINE_LINUX="text"
  3. 更新grub:update-grub
  4. 更新系统服务管理器配置:systemctl set-default multi-user.target
  5. 重启:init 6(效果)

更新后grub文件

# If you change this file, run 'update-grub' afterwards to update# /boot/grub/grub.cfg.# For full documentation of the options in this file, see:#   info -f grub -n 'Simple configuration'GRUB_DEFAULT=0GRUB_TIMEOUT=5GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`GRUB_CMDLINE_LINUX_DEFAULT="quiet"GRUB_CMDLINE_LINUX="text"# Uncomment to enable BadRAM filtering, modify to suit your needs# This works with Linux (no patch required) and with any kernel that obtains# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"# Uncomment to disable graphical terminal (grub-pc only)#GRUB_TERMINAL=console# The resolution used on graphical terminal# note that you can use only modes which your graphic card supports via VBE# you can see them in real GRUB with the command `vbeinfo'#GRUB_GFXMODE=640x480# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux#GRUB_DISABLE_LINUX_UUID=true# Uncomment to disable generation of recovery mode menu entries#GRUB_DISABLE_RECOVERY="true"# Uncomment to get a beep at grub start#GRUB_INIT_TUNE="480 440 1"

解除debian root用户登陆限制

  1. 打开gdm配置文件:/etc/gdm3/deamon.conf
  2. 配置安全设置:[security] 下一行添加 "AllowRoot = ture"
  3. 去除gdm登陆用户名检测:打开文件/etc/pam.d/gdm-autologin,并其相关配置信息删除或注释掉:
auth	required	pam_succeed_if.so user != root quiet_success

更新后的gdm-autologin文件:

#%PAM-1.0auth    requisite       pam_nologin.so#auth	required	pam_succeed_if.so user != root quiet_successauth    required        pam_permit.so[@include](https://my.oschina.net/JLXINAO) common-account# SELinux needs to be the first session rule. This ensures that any # lingering context has been cleared. Without this it is possible # that a module could execute code in the wrong domain.session [success=ok ignore=ignore module_unknown=ignore default=bad]        pam_selinux.so closesession required        pam_loginuid.so# SELinux needs to intervene at login time to ensure that the process# starts in the proper default security context. Only sessions which are# intended to run in the user's context should be run after this.session [success=ok ignore=ignore module_unknown=ignore default=bad]        pam_selinux.so opensession optional        pam_keyinit.so force revokesession required        pam_limits.sosession required        pam_env.so readenv=1session required        pam_env.so readenv=1 envfile=/etc/default/locale[@include](https://my.oschina.net/JLXINAO) common-session[@include](https://my.oschina.net/JLXINAO) common-password

转载于:https://my.oschina.net/yangzhiwei256/blog/3011234

你可能感兴趣的文章
Redis中常用五种数据结构
查看>>
scala 中类似 py 的 strip 的字符串处理
查看>>
AmplifyJS源码简析:事件分发
查看>>
在DigitalOcean上部署Flask应用(Ubuntu14.04)
查看>>
爬虫之requests详解
查看>>
农行支付接口:无法读取证书文档
查看>>
微服务架构下的API网关
查看>>
有爱有恨的MDL锁
查看>>
一文解析统计学在机器学习中的重要性
查看>>
新版 Edge 将提供使用 Fluent Design 设计语言的选项
查看>>
行业看点 | IBM与三星等12家公司联手,量子计算机领域竞争激烈
查看>>
智能媒体管理产品文档转换/预览功能介绍(3)---预览原理
查看>>
三星给自家的Gear VR手机头显配上了运动手柄,下月开卖
查看>>
CMU开设美国首个人工智能本科专业
查看>>
优化 Docker 体验,Docker Registry-V2 加入 OCI 促进行业标准化
查看>>
Expert 诊断优化系列------------------内存不够用么?
查看>>
VMware与亚马逊AWS强强联合,为用户提供更好的云计算服务
查看>>
岛国人民又大开脑洞,让机器人来演灾难片
查看>>
为加快VR内容开发,美国科格斯韦尔学院推出VR/AR证书课程
查看>>
QQ音乐的各种相关API
查看>>