How to upgrade normal users to root permissions in Ubuntu

Source: Internet
Author: User
I recently used a package (libpcap) to develop a project in Ubuntu. This package can be used for underlying parsing of network streams. However, when I use this package for network sniffing, the root permission is required and sudo is often used to run the program. In order to facilitate project debugging, the current user is promoted to the root permission. The method for upgrading is as follows: Enter sudogedit/etc/passwd in shell

I recently used a package (libpcap) to develop a project in Ubuntu. This package can be used for underlying parsing of network streams. However, when I use this package for network sniffing, the root permission is required and sudo is often used to run the program. In order to facilitate project debugging, the current user is promoted to the root permission.

The method for upgrading is as follows: Enter sudo gedit/etc/passwd in shell to modify the ID value of the current user. For example, my current user is linuxidc

You can find linuxidc: x: 1001: 1001: www.linuxidc.com:/home/linuxidc:/bin/bash and change the two 1000 to 0.

The final result is:

Linuxidc: x: 0: 0: www.linuxidc.com:/home/linuxidc:/bin/bash

Finally, log out of the Ubuntu system, and enter your username and password in the login user name, so that the login is the root permission. This is because the root ID is 0.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.