码迷,mamicode.com
首页 > 系统相关 > 详细

Kubuntu 15.04 SDDM 使用root用户登录

时间:2015-04-27 00:50:51      阅读:441      评论:0      收藏:0      [点我收藏+]

标签:

kubuntu 15.04 开始用sddm来替代kdm,登录的时候要用root用户登录?

Easy!!!

~#cat /etc/sddm.conf 
[Autologin]
Relogin=false
Session=
User=

[General]
HaltCommand=
RebootCommand=

[Theme]
CursorTheme=breeze_cursors

[Users]
HideShells=/sbin/nologin,/bin/false
# Hidden users, this is if any system users fall within your range, see /etc/passwd on your system.
HideUsers=daemon bin sys sync man lp mail news uucp proxy www-data backup list irc gnats nobody syslog messagebus colord lightdm avahi-autoipd avahi usbmux kernoops rtkit whoopsie speech-dispatcher hplip saned mysql sshd festival dnsmasq dhcpd gdm pulse postfix xrdp firebird vnstat ntpd usermetrics  uuidd icecast2 minidlna ntop memcache systemd-timesync systemd-network systemd-resolve systemd-bus-proxy sddm


# Maximum user id for displayed users, 随便啦,不用别的用户都可以用1
MaximumUid=65000

# Minimum user id for displayed users, root 用户是0最小ID得为0
MinimumUid=0


光这样当然不行了

~#cat /etc/pam.d/sddm
#%PAM-1.0

# Block login if they are globally disabled
auth    requisite       pam_nologin.so
# auth    required        pam_succeed_if.so user != root nopasswdlogin  重点是这里注释了这行,换成了下面这行
auth    sufficient      pam_succeed_if.so user ingroup nopasswdlogin

# auth    sufficient      pam_succeed_if.so user ingroup nopasswdlogin
@include common-auth
-auth   optional        pam_gnome_keyring.so
-auth   optional        pam_kwallet.so

@include 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 close
# Create a new session keyring.
session optional        pam_keyinit.so force revoke
session required        pam_limits.so
session required        pam_loginuid.so
@include common-session
# 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 open
-session optional       pam_gnome_keyring.so auto_start
-session optional       pam_kwallet.so auto_start

@include common-password

# From the pam_env man page
# Since setting of PAM environment variables can have side effects to other modules, this module should be the last one on the stack.

# Load environment from /etc/environment
session required        pam_env.so

# Load environment from /etc/default/locale
session required        pam_env.so envfile=/etc/default/locale

替换了文件的第五行

当然root用户得设置好密码才行

然后重启,或者pkill sddm 就ok了。
















Kubuntu 15.04 SDDM 使用root用户登录

标签:

原文地址:http://my.oschina.net/sillvester/blog/406580

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!