ubuntu怎么切换到root用户,切换到ubuntu root账号号方法

Ubuntu root账户开启及密码重设
最新的Ubuntu root账户默认为禁用状态,对开发人员而言会非常麻烦,开发机毕竟不是服务器,还是root比较省心,这时就需要激活root用户、设置root密码。当然,似乎Ubuntu也在培养用户使用普通账户的意识,但其也不得不承认,过分的安全自然需要付出自由的代价,因为安全永远是相对的,而且大多数安全问题并非因为猜测密码、启用ROOT或Administrator引起的,而是因为系统漏洞。
一、root账户开启
启用root用户命令如下:
sudo passwd root
按照输出提示输入新的密码,并确认(但是如果之前设置过密码,这里如需输入之前密码,否则无法继续修改)。重启Ubuntu或注销当前用户后,就可以用 root 登录(root名称区分大小写!!!)。
如果只是想在终端模式下切换到root账户(临时用一下),可以使用:
临时切换命令如下:
sudo -s -H
然后按照提示输入root密码即可。
注:其它平台可能使用su root、su -root等(如果当前登录账户为root,想切换到其他xxx用户,只需执行su xxx即可,无需输入密码)。密码缺省保存15分钟,超过时间, 可能需要重新输入。
二、关闭root账户
禁用 root 帐号登录命令如下:
sudo passwd -l root
三、root密码重设
跟上面开启root密码命令相同:
sudo passwd root
四、补充Ubuntu 12.04 LTS
在Ubuntu 12开始,这个ROOT账户根本看不到登录入口,以前有个其它账户登录选项,现在直接被取消了,可以通过如下方式打开:
1) test@ubuntu:~$ sudo su -
2) root@ubuntu:~# cp -p /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.orig
3) root@ubuntu:~# vi /etc/lightdm/lightdm.conf
4) 添加如下部分:
greeter-show-manual-login=true
5) 修改完成后大概样子如下:
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true
6) 保存退出,:wq
7) 重启Ubuntu 12.04 LTS,就可以看到有Login(Other)登录选项。( )
参考资料:
更多文章:
相关文章:&&
相关评论(4):&&
天缘网友 []:
19:29:44 发表
搜到过很多方法对Ubuntu 12都无效,终于在你这里得到完美解决,非常、非常感谢!
天缘网友 []:
19:47:26 发表
我觉得尽量用sudo !!就足够了...
邮箱(选填)
主页(选填)
记住我,下次回复时不用再次输入个人信息
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。[转]Linux-Ubuntu 启用root账户 - 子坞 - 博客园
转自:/blog/477619
  Ubuntu Linux有一个与众不同的特点,那就是初次使用时,你无法作为root来登录系统,为什么会这样?这就要从系统的安装说起。对于其他Linux系统来 说,一般在安装过程就设定root密码,这样用户就能用它登录root帐户或使用su命令转换到超级用户身份。与之相反,Ubuntu默认安装时,并没有 给root用户设置口令,也没有启用root帐户。问题是要想作为root用户来运行命令该怎么办呢?没关系,我们可以使用sudo命令达此目的。  sudo是linux下常用的允许普通用户使用超级用户权限的工具,该命令为管理员提供了一种细颗粒度的访问控制方法,通过它人们既可以作为超级 用户又可以作为其它类型的用户来访问系统。这样做的好处是,管理员能够在不告诉用户root密码的前提下,授予他们某些特定类型的超级用户权限,这正是许 多系统管理员所梦寐以求的。&
  方法一:  设置分配很简单,只要为root设置一个root密码就行了: $ sudo passwd root  之后会提示要输入root用户的密码,连续输入root密码,再使用:$ su  就可以切换成超级管理员用户登陆了!&
  1. 在终端执行 sudo passwd root 指令后,系统将会提示你设置一个新的 root 帐号密码。&  2. 点击 System -& Preferences -& Login Window 菜单,并切换到 Security 选项页,然后选中其下的&Allow local system administrator login&选项。&  执行上述两步后,你便可以使用 root 帐号登录 Ubuntu 系统了。&
  如果要再次禁用 root 帐号,那么可以执行 sudo passwd -l root
  sudo passwd root来设置root用户的密码来开启root帐号,锁定帐户是sudo passwd -l,开启帐户是sudo passwd -u(需要以前锁定过,否则无效)。&
  方法二:  在Ubuntu中用root帐号登录&  其实我个人认为这没有多大必要,因为当你需要 root 的权限时,使用 sudo 便可以了。如果你实在需要在 Ubuntu 中启用 root 帐号的话,那么不妨执行下面的操作:&  1.重新设置 root 的密码:$sudo passwd root   #按照提示输入两次新的密码,并加以确认。&  2.启用root用户登录:&$sudo vi /etc/gdm/gdm.conf &  #打开gnome的配置文件,在末行模式中输入:AllowRoot回车,找到AllowRoot=false ,把false改为true,保存后退出。&  之后,重启系统时,就可以用 root 登录了。如果你想要禁用 root 帐号,则执行下列命令:&$sudo passwd -l root&  Ubuntu 中的 root 帐号默认是被禁用了的。在这种情况之下,如果你想要使用 root 的权限来干些事情,就需要 sudo 指令。对某些朋友来说,他们可能需要激活 Ubuntu 中的 root 帐号。&
  Fedora 10 上如何让root登陆系统
  Fedora10默认是不允许root账号进行GUI登陆的,下面是解决方式。&  首先以用户账号进入终端,允许root账号登陆:&  首先 su&  然后 vi /etc/pam.d/gdm&  删除其中的一行 auth required pam_succeed_if.so user != root quiet&  然后wq保存并退出。&  这样就可以使用root进行GUI登陆了。&  还可以修改 /etc/gdm/contom.conf文件,增加下面几行,启用root自动登陆&& & & [daemon]&& & & AutomaticLoginEnable=true&& & & AutomaticLogin=user_name&    Fedora 10的网络服务不能自动启动,同样需要修改&  chkconfig --level 35 network on&  如果使用GUI界面去修改网络配置,貌似那个修改程序有BUG,子网掩码改完了再打开就变成了192.168.1.1&  同样,可以在文件中直接修改。&文件位置:/etc/sysconfig/network-scripts/ifcfg-eth0&  还可以开机以root身份登陆系统,登陆模式是图形界面,提示无法验证用户,很纳闷,密码也没错啊,输入了几次依然提示&无法验证用户&。只好用一个普通用户登陆了。&打开终端 输入 su ,再输入 root 密码,成功转到 root 用户。设置开机启动模式为文本模式,重新启动到文本模式下,输入 root 和密码,登陆成功,看来在文本模式下是可以用root登陆的。&  不能以root身份登陆到图形模式,可能是出于安全考虑。虽然只能用普通用户登陆到图形界面,但是在图形界面模式下可以更改root的密码。选择 系统--&管理--&根口令,弹出对更改root密码的对话框。&
  图形化 root 登陆&  Fedora 11 默认并不允许在 GDM 中以 root 登陆,而必须使用正常用户登陆后在终端中成为 root 权限。然后很多用户仍然想以 root 登陆。虽然我不赞成但还是说一下怎么做。请不要忘记一旦你使用 root 登陆后会毁坏你的系统,所以请不要输入下面的命令,除非你知道你在做什么。&  打开终端输入:&su -c 'gedit /etc/pam.d/gdm  找到下面这行:&auth required pam_succeed_if.so user != root quiet&  将这一行备注掉:&#auth required pam_succeed_if.so user != root quiet&  保存这个文件后登出,然后你就可以以 root 登陆了。
【本文转自 感谢作者】&扫一扫,访问微社区
查看: 902|回复: 6
云币1136 威望669 最后登录积分2093注册时间帖子
云币1136 威望669
由于腾讯云主机ubuntu系统默认用户名为ubuntu,不喜欢每次做什么都要sudo一下,故设置开启允许root用户登录
方法如下:
1.修改root密码sudo passwd root
复制代码输入密码(一般和ubuntu密码一样,方便记忆)
21:39 上传
2.修改ssh配置sudo vi /etc/ssh/sshd_config 复制代码找到&&PermitRootLogin 这项 将其改为 yes
21:42 上传
保存退出并重启ssh服务既可。sudo service ssh&&restart复制代码————————————————————————————————————————————————————————————
赞与谢,及时收割
如果本篇文章对您有用,请您小手一抖,给予我们最好的鼓励~~
有 1923 人觉得本主题有帮助
云币727 威望573 最后登录积分1673注册时间帖子
云币727 威望573
赞赞赞!!!!!!!谢谢您的分享
云币867 威望580 最后登录积分1529注册时间帖子
云币867 威望580
尽量不用root来登录哦,这会给服务器安全留下隐患,让黑客入侵你的服务器
&有道理: 5 &
云币10 威望10 最后登录积分22注册时间帖子
实习码农[LV1], 积分 22, 距离下一级还需 128 积分
云币10 威望10
求教一下,第二步的sudo vi /etc/ssh/sshd_config执行以后,不是这个提示,是这样的,
17:26 上传
,找不到PermitRootLogin这一项,应该怎么弄?纯小白,望解答,谢谢。
云币10 威望10 最后登录积分22注册时间帖子
实习码农[LV1], 积分 22, 距离下一级还需 128 积分
云币10 威望10
发表于 5&天前
老说我没有权限,怎么弄?
云币10 威望10 最后登录积分22注册时间帖子
实习码农[LV1], 积分 22, 距离下一级还需 128 积分
云币10 威望10
发表于 昨天&11:40
guest能用sudo?上来第一行就sudo是什么逻辑
云币15 威望15 最后登录积分32注册时间帖子
实习码农[LV1], 积分 32, 距离下一级还需 118 积分
云币15 威望15
发表于 昨天&18:42
绑定不了微信。银行卡预留号码不一样。麻烦楼主
长期对论坛的繁荣而不断努力,或多次提出建设性意见
注册账号后积极发帖的会员
Powered by【部分解决】Ubuntu中提升当前普通用户的权限使其变成sudo超级用户
已安装一个Ubuntu虚拟机。
在其中想要折腾开发方面的事情。
需要去到opt下建立文件夹,结果竟然说没权限:
crifan@ubuntu:~/develop$ pwd
/home/crifan/develop
crifan@ubuntu:~/develop$ cd /opt/
crifan@ubuntu:/opt$ ls
crifan@ubuntu:/opt$ mkdir crosscompile
mkdir: cannot create directory ‘crosscompile’: Permission denied
crifan@ubuntu:/opt$ users
crifan crifan
crifan@ubuntu:/opt$
所以,现在希望:
每次,使用当前的普通用户,登陆后,即可具有超级用户sudo的权限。
不希望再每次输入sudo,直接用。
即把当前用户,提升权限,变成超级用户。
【折腾过程】
1.网上搜了一堆,都是开启Ubuntu的root用户的,对我此处没啥意义。
中提到了:
去看了看,感觉不适合我。
其只是,将用户变成对于某些东西有sudo 的权限,但是用起来,还是需要输入sudo的,还是很麻烦。
3.继续参考上面的解释,说是可以把当前用户加到wheel or admin group。
不太懂wheel是啥。以及如何添加。
关于为何管理员组,被叫做wheel,这里有解释:
4.然后去想办法,把当前用户加到管理员组里面。
ubuntu Add user to the wheel group
然后去修改
/etc/sudoers
一是没有%wheel
二是要加的:
# usermod -G10 user1
也看起来不对:#明显是注释掉了此行而已
所以,放弃此人的教程。
ubuntu Add user to the root group
去看看这些相关的命令:
crifan@ubuntu:/opt$ su -
su: Authentication failure
crifan@ubuntu:/opt$ sudo -s
root@ubuntu:/opt# usermode --help
No command 'usermode' found, did you mean:
Command 'usermod' from package 'passwd' (main)
usermode: command not found
root@ubuntu:/opt# usermod --help
Usage: usermod [options] LOGIN
-c, --comment COMMENT
new value of the GECOS field
-d, --home HOME_DIR
new home directory for the user account
-e, --expiredate EXPIRE_DATE
set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE
set password inactive after expiration
to INACTIVE
-g, --gid GROUP
force use GROUP as new primary group
-G, --groups GROUPS
new list of supplementary GROUPS
-a, --append
append the user to the supplemental GROUPS
mentioned by the -G option without removing
him/her from other groups
-h, --help
display this help message and exit
-l, --login NEW_LOGIN
new value of the login name
-L, --lock
lock the user account
-m, --move-home
move contents of the home directory to the
new location (use only with -d)
-o, --non-unique
allow using duplicate (non-unique) UID
-p, --password PASSWORD
use encrypted password for the new password
-R, --root CHROOT_DIR
directory to chroot into
-s, --shell SHELL
new login shell for the user account
-u, --uid UID
new UID for the user account
-U, --unlock
unlock the user account
-Z, --selinux-user SEUSER
new SELinux user mapping for the user account
root@ubuntu:/opt#
6.但是仍旧不知道当前,存在哪些group。
貌似默认的是root这个group。
7.所以,可以去试试:
root@ubuntu:/opt# usermod -a -G root crifan
8.然后再退出当前root用户:
root@ubuntu:/opt# exit
去使用crifan,看看能否创建文件夹,结果还是不行:
crifan@ubuntu:/opt$ mkdir crosscompile
mkdir: cannot create directory ‘crosscompile’: Permission denied
9.然后logout注销:
重新用crifan登陆,再试试,结果还是不行。
10.算了,还是进入系统管理工具里面, 试试如何把当前的用户,添加到root组里面。
结果发现,当前用户,已经是administrator了:
而且貌似无法更改属于哪个组。
11.看来还是需要想别的办法。
crifan@ubuntu:~/Desktop$ sudo -s
[sudo] password for crifan:
root@ubuntu:~/Desktop# usermod -a -G sudo crifan
然后再去试试是否可行,结果不行,然后又去试了其他的:
crifan@ubuntu:~/Desktop$ cd /opt/
crifan@ubuntu:/opt$ mkdir crosscompile
mkdir: cannot create directory ‘crosscompile’: Permission denied
crifan@ubuntu:/opt$ sudo -s
root@ubuntu:/opt# more /etc/sudoers
# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults env_reset
Defaults mail_badpass
Defaults secure_path=&/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
sbin:/bin&
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on &#include& directives:
root@ubuntu:/opt# cat /etc/sudoers
# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults env_reset
Defaults mail_badpass
Defaults secure_path=&/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on &#include& directives:
#includedir /etc/sudoers.d
root@ubuntu:/opt# usermod -a -G admin crifan
usermod: group 'admin' does not exist
root@ubuntu:/opt# exit
crifan@ubuntu:/opt$
重新logout后,再登陆试试,结果还是不行。
12.再去参考上面帖子,去试试:
/etc/sudoers
%wheel ALL=(ALL) ALL
然后把自己加上:
usernod -a -G wheel crifan
结果总之还是不行:
crifan@ubuntu:/opt$ mkdir crosscompile
mkdir: cannot create directory ‘crosscompile’: Permission denied
crifan@ubuntu:/opt$ sudo gedit /etc/sudoers
[sudo] password for crifan:
(gedit:6653): IBUS-WARNING **: The owner of /home/crifan/.config/ibus/bus is not root!
crifan@ubuntu:/opt$ sudo -s
root@ubuntu:/opt# usermod -a -G wheel crifan
usermod: group 'wheel' does not exist
root@ubuntu:/opt# usermod -G wheel crifan
usermod: group 'wheel' does not exist
root@ubuntu:/opt# usermod -a wheel crifan
Usage: usermod [options] LOGIN
-c, --comment COMMENT
new value of the GECOS field
-d, --home HOME_DIR
new home directory for the user account
-e, --expiredate EXPIRE_DATE
set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE
set password inactive after expiration
to INACTIVE
-g, --gid GROUP
force use GROUP as new primary group
-G, --groups GROUPS
new list of supplementary GROUPS
-a, --append
append the user to the supplemental GROUPS
mentioned by the -G option without removing
him/her from other groups
-h, --help
display this help message and exit
-l, --login NEW_LOGIN
new value of the login name
-L, --lock
lock the user account
-m, --move-home
move contents of the home directory to the
new location (use only with -d)
-o, --non-unique
allow using duplicate (non-unique) UID
-p, --password PASSWORD
use encrypted password for the new password
-R, --root CHROOT_DIR
directory to chroot into
-s, --shell SHELL
new login shell for the user account
-u, --uid UID
new UID for the user account
-U, --unlock
unlock the user account
-Z, --selinux-user SEUSER
new SELinux user mapping for the user account
root@ubuntu:/opt# usermod -G wheel crifan^C
root@ubuntu:/opt# sudo -s
root@ubuntu:/opt# gedit /etc/sudoers
(gedit:6802): IBUS-WARNING **: The owner of /home/crifan/.config/ibus/bus is not root!
root@ubuntu:/opt#
13.继续参考:
去给/etc/sudoers加上:
crifan ALL=(ALL) ALL
然后logout,再回来试试。
结果还是不行。
14.重启ubuntu试试,结果还是不行。
15.索性,还是参考:
去用此不太好,但是可用的办法吧:
sudo gedit /etc/passwd
将其中的:
crifan:x::crifan li,,,:/home/crifan:/bin/bash
crifan:x:0:0:crifan li,,,:/home/crifan:/bin/bash
logout,再进来试试,
但是结果右上角,都没有下拉菜单了。
而且打开终端会显示:
I have no name !!!
所以,还是去改回来吧。
结果都进不去了:
I have no name!@ubuntu:~/Desktop$ sudo gedit /etc/passwd
sudo: unknown uid 1000: who are you?
结果只有强制关闭此Ubuntu虚拟机的电源才得以关闭,否则都没法关闭Ubuntu。。。
16.重启后,的确是可以用root权限创建文件夹了:
root@ubuntu:~/Desktop# cd /opt/
root@ubuntu:/opt# mkdir crosscompile
root@ubuntu:/opt#
但是很明显,当前用户,不是我的crifan,而是root了。
所以,还是先去改回来:
crifan:x::crifan li,,,:/home/crifan:/bin/bash
然后重启Ubuntu。
去把之前添加到/etc/sudoers中的内容,放到最后,变成:
# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults env_reset
Defaults mail_badpass
Defaults secure_path=&/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on &#include& directives:
#includedir /etc/sudoers.d
#%wheel ALL=(ALL) ALL
crifan ALL=NOPASSWD: ALL
logout看看效果。还是没权限。
现在,目前,是已经实现了,使用sudo,可以不用输入密码了:
crifan@ubuntu:~/Desktop$ cd /opt
crifan@ubuntu:/opt$ ls
crosscompile
crifan@ubuntu:/opt$ rmdir crosscompile/
rmdir: failed to remove ‘crosscompile/’: Permission denied
crifan@ubuntu:/opt$ mkdir crosscompile
mkdir: cannot create directory ‘crosscompile’: File exists
crifan@ubuntu:/opt$ mkdir crosscompile2
mkdir: cannot create directory ‘crosscompile2’: Permission denied
crifan@ubuntu:/opt$ sudo rmdir crosscompile/
crifan@ubuntu:/opt$
18.但是,其实更希望做到的是:
以crifan用户登陆,每次操作,连sudo都不需要输入,即可用于super user的权限。
发现这人:
和我需求是一样的。
参考其中的解释,打算去:
把id都改为0,但是是先创建一个新的用户,比如crifan2013,然后把crifan2013的id都改为0,然后就自动,好像变成了root用户了,就不用输入sudo了。
不过打算先去试试另外那个方法,把密码留空。
弄了半天,结果就是,把
/etc/shadow
最后一行中的,自己用户的密码,去掉,即从:
crifan:$1$NH4QMkeN$pzTmJ07F.tF3T3H75Kw5R.:99:7:::
crifan::99:7:::
但是此此处去执行sudo却还是没权限:
crifan@ubuntu:/opt$ sudo sed &s/\(^$whoami):[^:]*/\1/& /etc/shadow & /etc/shadowbash: /etc/shadow: Permission denied
所以,还是手动去修改算了。
然后logout试试。
结果还是和之前一样的效果而已:
crifan@ubuntu:/opt$ ls
crifan@ubuntu:/opt$ mkdir crosscompile
mkdir: cannot create directory ‘crosscompile’: Permission denied
crifan@ubuntu:/opt$ sudo mkdir crosscompile
crifan@ubuntu:/opt$
比如还是要输入sudo才行的。虽然无需再输入密码。
所以,还是用之前的:
&把id都改为0,但是是先创建一个新的用户,比如crifan2013,然后把crifan2013的id都改为0,然后就自动,好像变成了root用户了,就不用输入sudo了。&
去新建一个用户:
(1)参考:
crifan@ubuntu:/opt$ sudo adduser crifan2013
Adding user `crifan2013' ...
Adding new group `crifan2013' (1001) ...
Adding new user `crifan2013' (1001) with group `crifan2013' ...
Creating home directory `/home/crifan2013' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for crifan2013
Enter the new value, or press ENTER for the default
Full Name []: crifan li 2013
Room Number []:
Work Phone []:
Home Phone []:
Is the information correct? [Y/n] y
crifan@ubuntu:/opt$ sudo adduser crifan2013 admin
adduser: The group `admin' does not exist.
crifan@ubuntu:/opt$ sudo adduser crifan2013 sudo
Adding user `crifan2013' to group `sudo' ...
Adding user crifan2013 to group sudo
(2)把/etc/passwd中的:
crifan2013:x::crifan li 2013,,,:/home/crifan2013:/bin/bash
crifan2013:x:0:0:crifan li 2013,,,:/home/crifan2013:/bin/bash
(3)给/etc/sudoers中最后添加:
crifan2013 ALL=NOPASSWD: ALL
(4)重启Ubuntu,用crifan2013登陆。
结果竟然没有crifan2013这个用户。。。
后来才发现,比如去:
sudo gedit /etc/passwd
中把其uid和gid都恢复到原先的1001:
sudo gedit /etc/passwd
然后才能出现新的crifan2013这个用户。
然后用此用户登陆后,再去到
sudo gedit /etc/passwd
中,把id都改为0:
sudo gedit /etc/passwd
重启ubuntu试试。结果就还是没有了crifan2013这个用户。
即,还是没有实现所要的效果。
先去开启了root。
crifan@ubuntu:/opt$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
crifan@ubuntu:/opt$ sudo cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x::nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
syslog:x:101:103::/home/syslog:/bin/false
messagebus:x:102:105::/var/run/dbus:/bin/false
avahi-autoipd:x:103:106:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
usbmux:x:104:46:usbmux daemon,,,:/home/usbmux:/bin/false
dnsmasq:x:105:65534:dnsmasq,,,:/var/lib/misc:/bin/false
whoopsie:x:106:110::/nonexistent:/bin/false
kernoops:x:107:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false
rtkit:x:108:114:RealtimeKit,,,:/proc:/bin/false
speech-dispatcher:x:109:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
lightdm:x:110:116:Light Display Manager:/var/lib/lightdm:/bin/false
avahi:x:111:118:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
colord:x:112:120:colord colour management daemon,,,:/var/lib/colord:/bin/false
pulse:x:113:121:PulseAudio daemon,,,:/var/run/pulse:/bin/false
hplip:x:114:7:HPLIP system user,,,:/var/run/hplip:/bin/false
saned:x:115:123::/home/saned:/bin/false
crifan:x::crifan li,,,:/home/crifan:/bin/bash
crifan2013:x::crifan li 2013,,,:/home/crifan2013:/bin/bash
crifan@ubuntu:/opt$
至此,还是没有实现要的效果:
可以将普通用户crifan变成sudo(超级用户),使得,每次做任何操作,都,本身已有sudo权限,且不用输入sudo。
目前只能实现的效果是:
以crifan登陆,无需密码就可以登陆;
在crifan使用sudo时,无需输入sudo的密码了;
分类目录分类目录
选择分类目录
Uncategorized&&(10)
单身恋爱婚姻家庭&&(112)
&&&Lovestory&&(7)
&&&单身&&(21)
&&&婚姻&家庭&&(34)
&&&恋爱&&(46)
哲理 人生 故事&&(210)
&&&哲理佳句&&(39)
&&&电视剧《天道》&&(6)
&&&财富人生&&(44)
工作和技术&&(3,664)
&&&CharEncoding&&(3)
&&&CodeShare&&(17)
&&&CompilerLinkerParser&&(94)
&&&&&&ANTLR&&(92)
&&&&&&JavaCC&&(1)
&&&DevToolSoft&&(74)
&&&&&&Linux on Win&&(40)
&&&&&&&&&Cygwin&&(33)
&&&&&&&&&Gow&&(1)
&&&&&&&&&MingW&&(3)
&&&&&&&&&MSYS&&(3)
&&&&&&Putty&&(1)
&&&&&&Total Commander&&(2)
&&&&&&VersionControl&&(27)
&&&&&&&&&Git&&(18)
&&&&&&&&&SVN&&(7)
&&&Docbook&&(127)
&&&DocxyGen&&(1)
&&&Elance&&(6)
&&&Embedded&&(517)
&&&&&&BusyBox&&(2)
&&&&&&CrossCompiler&&(102)
&&&&&&&&&Buildroot&&(30)
&&&&&&&&&crosstool-ng&&(40)
&&&&&&Embedded Emulator&&(15)
&&&&&&&&&QEMU&&(15)
&&&&&&Embedded Filesystem&&(4)
&&&&&&&&&Yaffs2&&(2)
&&&&&&Embedded IDE&&(3)
&&&&&&&&&HEW&&(1)
&&&&&&&&&IAR&&(1)
&&&&&&Embedded OnChip Resource&&(2)
&&&&&&&&&Memory&&(2)
&&&&&&&&&&&&SDRAM&&(1)
&&&&&&Embedded OS&&(9)
&&&&&&&&&Realtime OS&&(2)
&&&&&&Embedded Peripherals&&(112)
&&&&&&&&&Bluetooth&&(21)
&&&&&&&&&CAN Bus&&(2)
&&&&&&&&&DMA&&(1)
&&&&&&&&&GPIO&&(1)
&&&&&&&&&Serial Communication&&(13)
&&&&&&&&&&&&RS232&&(10)
&&&&&&&&&&&&&&&SecureCRT&&(3)
&&&&&&&&&&&&RS485&&(2)
&&&&&&&&&Storage&&(73)
&&&&&&&&&&&&Flash&&(31)
&&&&&&&&&&&&SD/MMC&&(9)
&&&&&&&&&&&&USB&&(32)
&&&&&&Fieldbus&&(57)
&&&&&&&&&DTM&&(1)
&&&&&&&&&EDDL&&(10)
&&&&&&&&&HART&&(29)
&&&&&&&&&Modbus&&(1)
&&&&&&&&&Profibus&&(6)
&&&&&&&&&PROFINET&&(2)
&&&&&&Industrial Automation&&(59)
&&&&&&Linaro&&(1)
&&&&&&Linux Kernel&&(2)
&&&&&&MCU SoC IP-Core&&(11)
&&&&&&&&&ARM&&(4)
&&&&&&&&&NEC&&(2)
&&&&&&PLC&&(38)
&&&&&&Symbology_Barcode&&(6)
&&&&&&Thread&&(2)
&&&&&&Uboot&&(17)
&&&EncryptDecrypt&&(1)
&&&Hardware&&(13)
&&&&&&Opensource Hardware&&(10)
&&&&&&&&&pcDuino&&(7)
&&&IDE TextEditor&&(87)
&&&&&&Apatana Studio 3&&(2)
&&&&&&ATOM&&(4)
&&&&&&Eclipse&&(37)
&&&&&&Notepad++&&(5)
&&&&&&SciTE&&(1)
&&&&&&Source Insight&&(7)
&&&&&&Sublime Text&&(6)
&&&&&&Visual Studio&&(4)
&&&&&&Xcode&&(20)
&&&&&&&&&Instruments&&(1)
&&&&&&&&&iOS Simulator&&(1)
&&&Network&&(7)
&&&&&&SIP&&(1)
&&&&&&Wireshark&&(3)
&&&OS_Platform&&(583)
&&&&&&CentOS&&(4)
&&&&&&Linux&&(146)
&&&&&&&&&diff&&(4)
&&&&&&&&&Driver&&(36)
&&&&&&&&&gcc&&(1)
&&&&&&&&&makefile&&(13)
&&&&&&&&&NFS&&(2)
&&&&&&&&&patch&&(3)
&&&&&&&&&Wireless&&(7)
&&&&&&Mac&&(35)
&&&&&&&&&Cocoa&&(1)
&&&&&&&&&iphone&&(1)
&&&&&&MobilePlatform&&(351)
&&&&&&&&&Android&&(266)
&&&&&&&&&&&&Android Studio&&(14)
&&&&&&&&&&&&Osmand&&(5)
&&&&&&&&&iOS&&(85)
&&&&&&&&&&&&Swift&&(35)
&&&&&&Ubuntu&&(38)
&&&&&&Windows&&(9)
&&&pneumatic&&(1)
&&&ProgrammingLanguage&&(737)
&&&&&&C&&(48)
&&&&&&C#&&(161)
&&&&&&GO&&(47)
&&&&&&Java&&(48)
&&&&&&&&&JSP&&(1)
&&&&&&&&&Openfire&&(10)
&&&&&&&&&Spark&&(1)
&&&&&&Object-C&&(4)
&&&&&&Perl&&(4)
&&&&&&PHP&&(151)
&&&&&&&&&Drupal&&(16)
&&&&&&&&&Joomla&&(4)
&&&&&&&&&MediaWiki&&(4)
&&&&&&&&&WordPress&&(90)
&&&&&&Python&&(253)
&&&&&&&&&BeautifulSoup&&(11)
&&&&&&&&&Django&&(7)
&&&&&&&&&Python GUI&&(3)
&&&&&&&&&Python IDE&&(14)
&&&&&&&&&Python3&&(8)
&&&&&&&&&StringEncoding&&(16)
&&&&&&R&&(5)
&&&&&&VB.Net&&(5)
&&&&&&VBA&&(11)
&&&RegularExpression&&(54)
&&&&&&Android regex&&(3)
&&&&&&C# Regex&&(1)
&&&&&&dreamweaver regex&&(1)
&&&&&&EditPlus TR1&&(1)
&&&&&&Java regex&&(6)
&&&&&&Notepad++ regex&&(1)
&&&&&&Perl //&&(1)
&&&&&&PHP preg_match&&(1)
&&&&&&Python re&&(30)
&&&&&&UltraEdit 3 type regex&&(1)
&&&&&&VB.NET Regex&&(1)
&&&Soft Dev Basics&&(19)
&&&TechMaterialDownload&&(27)
&&&technical_fun&&(2)
&&&TechnicalLife&&(20)
&&&tmp_todo&&(103)
&&&Virtual Machine&&(78)
&&&&&&VirtualBox&&(42)
&&&&&&VMWare&&(29)
&&&Web_Technology&&(343)
&&&&&&BBS&&(8)
&&&&&&Crawl_EmulateLogin&&(75)
&&&&&&&&&Amazon&&(29)
&&&&&&&&&eBay&&(9)
&&&&&&&&&Scrapy&&(6)
&&&&&&&&&Taobao&&(1)
&&&&&&CSS&&(6)
&&&&&&Google&&(32)
&&&&&&&&&Google Adsense&&(28)
&&&&&&HTML&&(5)
&&&&&&JavaScript&&(24)
&&&&&&&&&easyUI&&(2)
&&&&&&&&&KindEditor&&(3)
&&&&&&&&&Node.js&&(10)
&&&&&&JSON&&(22)
&&&&&&MySQL&&(3)
&&&&&&Skydrive&&(5)
&&&&&&swf flash&&(1)
&&&&&&Tencent&&(1)
&&&&&&UML&&(2)
&&&&&&VirtualHost&&(68)
&&&&&&&&&cPanel&&(3)
&&&&&&&&&hawk&&(11)
&&&&&&&&&sugarhosts&&(7)
&&&&&&&&&TransferWebHosting&&(16)
&&&&&&WebServer&&(5)
&&&&&&&&&apache&&(4)
&&&&&&&&&nginx&&(1)
&&&&&&WeiXin&&(5)
&&&&&&WLW&&(24)
&&&&&&XML&&(3)
&&&&&&&&&XPath&&(2)
&&&wiki&&(2)
&&&经验和教训&&(9)
无法写入&&(1)
有意义&&(637)
&&&值得看的东东&&(138)
&&&新闻与社会&&(196)
&&&日本&&(13)
&&&看图不说话&&(113)
&&&罗永浩[老罗]&&(18)
有趣&&(850)
&&&多收了三五斗&&(21)
&&&开心西游记&&(43)
&&&笑话幽默&&(106)
&&&脑筋急转弯&&(19)
&&&视频&&(22)
&&&超强男女经典征婚启事&&(9)
生活&&(1,433)
&&&Tmp&&(9)
&&&个人推荐&&(84)
&&&信息记录&&(4)
&&&历史&&(3)
&&&安徽&&(12)
&&&心情与思考&&(65)
&&&文学&&(13)
&&&旅游&&(23)
&&&楼市与住房&&(308)
&&&&&&日常生活&&(3)
&&&&&&海德公园&&(39)
&&&&&&装修&&(223)
&&&&&&&&&卫浴&&(1)
&&&&&&&&&吊顶&&(1)
&&&&&&&&&地暖&&(50)
&&&&&&&&&地板&&(2)
&&&&&&&&&家电商场&&(1)
&&&&&&&&&封阳台&&(1)
&&&&&&&&&建材市场&&(9)
&&&&&&&&&整体橱柜&&(8)
&&&&&&&&&瓷砖&&(6)
&&&&&&&&&&&&木纹砖&&(3)
&&&&&&&&&空调&&(1)
&&&&&&&&&衣柜&&(1)
&&&&&&&&&装修日记&&(117)
&&&&&&&&&门&&(2)
&&&淮安&&(3)
&&&游戏&&(14)
&&&电影&&(1)
&&&电脑+数码+软件&&(598)
&&&&&&数码电玩&&(165)
&&&&&&&&&I9100G&&(71)
&&&&&&&&&U盘量产&&(3)
&&&&&&&&&华为手机&&(21)
&&&&&&&&&安卓手机&&(5)
&&&&&&&&&老人机&&(1)
&&&&&&电信&&(2)
&&&&&&电脑_生活&&(9)
&&&&&&电脑知识&&(80)
&&&&&&笔记类软件&&(4)
&&&&&&&&&为知笔记&&(1)
&&&&&&&&&印象笔记&&(2)
&&&&&&系统使用&&(111)
&&&&&&&&&Mac系统&&(34)
&&&&&&&&&Windows系统&&(77)
&&&&&&&&&&&&win10&&(5)
&&&&&&网上银行&&(27)
&&&&&&&&&PayPal&&(1)
&&&&&&&&&中行BOC&&(13)
&&&&&&&&&华夏hxb&&(1)
&&&&&&&&&工行ICBC&&(5)
&&&&&&&&&招行&&(1)
&&&&&&&&&支付宝&&(3)
&&&&&&路由器&&(7)
&&&&&&软件使用&&(168)
&&&&&&&&&360&&(2)
&&&&&&&&&chrome&&(3)
&&&&&&&&&Excel&&(8)
&&&&&&&&&Firefox&&(17)
&&&&&&&&&Flash Player&&(2)
&&&&&&&&&google&&(6)
&&&&&&&&&&&&goagent&&(4)
&&&&&&&&&IE&&(1)
&&&&&&&&&Office&&(3)
&&&&&&&&&Outlook&&(5)
&&&&&&&&&PDF&&(2)
&&&&&&&&&PicPick&&(1)
&&&&&&&&&PowerPoint&&(1)
&&&&&&&&&QQ&&(14)
&&&&&&&&&shadowsocks&&(3)
&&&&&&&&&Thunderbird&&(14)
&&&&&&&&&Word&&(13)
&&&&&&&&&网易163&&(2)
&&&&&&&&&翻墙&&(9)
&&&经济&&(15)
&&&网上购物&&(17)
&&&美食&&(8)
&&&羽毛球&&(22)
&&&苏州&&(57)
&&&&&&工业园区&&(2)
&&&&&&&&&独墅湖高教区&&(2)
知道&&(180)
&&&English&&(60)
&&&生活百科&&(23)
&&&网络资源下载&&(45)
移动硬盘&&(1)
笔记本相关&&(533)
&&&买本前必看&&(33)
&&&无线和迅驰及其相关&&(10)
&&&电脑知识扫盲&&(12)
&&&神舟资料整理&&(342)
&&&&&&别人对神舟的无端诋毁&&(7)
&&&&&&某些笔记本价钱贵但毛病也不少&&(24)
&&&&&&神舟本网站评测&&(7)
&&&&&&神舟电脑评测&&(151)
&&&&&&神舟相关&&(103)
&&&&&&神舟笔记本好的方面的例子&&(17)
&&&&&&给不熟悉的人的解答&&(26)
&&&笔记本cpu&&(26)
&&&笔记本显卡&&(36)
&&&笔记本显卡游戏效果&&(27)
&&&走出笔记本使用误区&&(6)
&&&走出笔记本购买的误区&&(14)
&&&降频功耗散热&&(11)
音乐天堂&&(526)
&&&歌曲类型&&(437)
&&&&&&Hiphop_R&B_Rock&&(23)
&&&&&&中文歌曲&&(160)
&&&&&&外文歌曲&&(200)
&&&&&&纯音乐&无歌词&&(54)
&&&特定歌手&&(38)
&&&&&&Enigma&&(11)
&&&&&&Linkinpark&&(14)
&&&&&&陈琳&&(13)
&&&音乐下载&&(1)
&&&音乐知识&&(9)
默认分类&&(212)
&&&默认分类&&(3)
2016年三月
78910111213
14151617181920
21222324252627
免费的格式化Javascript源码的网站
查询Unicode字符,且还带Oct,Decimal,Hex,HTML Entity
HTML和Javascript都支持,很好用。

我要回帖

更多关于 ubuntu切换到root用户 的文章

 

随机推荐