注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

学习笔记

正确的方法如同学习书法,开始的时候要临摹,临摹好了然后创造自己的风格。

 
 
 

日志

 
 

[Debian/linux笔记]设置管理员用户  

2011-08-24 12:18:52|  分类: Debian/linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

From: http://www.server-world.info/en/note?os=Debian_6.0&p=initial_conf&f=1

Debian squeeze

1. If you set root password and activated the root during installation, configure settings to limit users who switch to root. 
[root@debian ~]# vi /etc/group
# line 5: add users you allow to switch to root
5 adm:x:4:root,weimen
[root@debian ~]# vi /etc/pam.d/su
# line 15: uncomment and add the follows
auth   required   pam_wheel.so   group=adm

2. Try to switch to root from a user you set to allow.
[root@debian ~]# su - fantity                   # switch to a user
[fantity@debian ~]$ su -                           # switch to root
Password:
[root@debian ~]#                                    # normally done

3. Add a test user and try to confirm the user can not switch to root.
[root@debian ~]# adduser test          # add test user
Adding user `test' ...
Adding new group `test' (1001) ...
Adding new user `test' (1001) with group `test' ...
Creating home directory `/home/test' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:# set password
Retype new UNIX password:# confirm
passwd: password updated successfully
Changing the user information for test
Enter the new value, or press ENTER for the default
    Full Name []: test# input the name
    Room Number []: testuser# input any one
    Work Phone []:# input any one(it's Ok with empty)
    Home Phone []:# input any one(it's Ok with empty)
    Other []:# input any one(it's Ok with empty)
Is the information correct? [y/N] y
[root@debian ~]# su - test                      # switch to the user
test@debian:~$ su -                                # switch to root           
Password:
su: Permission denied                              # normally access denied

  评论这张
 
阅读(1294)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018