How to grant a user have root priviledge on Ubuntu12
来源:互联网 发布:西安市干部网络培训 编辑:程序博客网 时间:2024/06/05 06:58
Do to suggest to do this: still check the effect for now.
ok, this comes from my hacker days of trying everything in the system to see what it did.
There is a file /etc/passwd
that famously holds passwords (or a marker to signify shadow passwords).
In that file, you will see something like this:
root:!:0:0::/:/usr/bin/kshdaemon:!:1:1::/etc:bin:!:2:2::/bin:sys:!:3:3::/usr/sys: adm:!:4:4::/var/adm:uucp:!:5:5::/usr/lib/uucp: guest:!:100:100::/home/guest:nobody:!:4294967294:4294967294::/:lpd:!:9:4294967294::/:lp:*:11:11::/var/spool/lp:/bin/false invscout:*:200:1::/var/adm/invscout:/usr/bin/kshnuucp:*:6:5:uucp login user:/var/spool/uucppublic:/usr/sbin/uucp/uucicopaul:!:201:1::/home/paul:/usr/bin/kshjdoe:*:202:1:John Doe:/home/jdoe:/usr/bin/ksh
[example taken from here]
the two sections that are interest to us are the numbers in position 3 and 4. the first one is the user ID, the second is the group. Notice that in this installation (and most installations) the values for root are both 0
If you use su or sudo to edit this file, and change the numbers on your user ID to be the same as root, then you will become root. (also, you will not be able to use rmuser on your ID, as it is now considered essential to the system)
- How to grant a user have root priviledge on Ubuntu12
- How to Add a User and Grant Root Privileges on CentOS 6.5
- How to create a new user and grant permissions on MySql
- How to grant access to SQL logins on a standby database when the guest user is disabled in SQL Serve
- grant execute on FUN to USER;
- How to kill a particular user terminal on Linux
- how to set VNCserver on Ubuntu12
- How to active 'root' user in ubuntu
- How to solve the problem : "You have been logged on with a temporary profile"
- Android - How to have a tiled background
- How to Have a Healthy Relationship
- How to create ftp user on Linux
- grant connect,resource to user
- How to create a user in PostgreSQL
- How to create a remote desktop user
- How to be a Google Power User
- Cannot connect Jenkins when changing to another user on Ubuntu12
- How to allow a user to click on TextBlocks which return an integer ID in the click handler
- Android中线程通讯类Handler
- 输出最短字符串
- PKU C++程序设计实习 学习笔记3 多态与虚函数
- 优化R程序性能
- 自然语言处理的一些工具文档介绍
- How to grant a user have root priviledge on Ubuntu12
- android 横屏和竖屏切换总结(特别是Javacode部分)
- JVM-GC总结-分代垃圾回收详解--第一发
- 图解CSS的padding,margin,border属性(详细介绍及举例说明)
- Mac 下利用 FileMerge 进行代码合并教程
- C++类构造函数初始化列表
- js获取当前服务器时间并动态刷新
- 构建OpenStack的云基础架构:ManageIQ(转)
- 【ExtJs】带日期组件的文本输入框、容器与Ext.Msg.alert告警框告警两次