Questions tagged [root]

On Unix-like systems, a special user account used for system administration.

root is the conventional name of the powerful user with id 0 on Unix-like systems such as Linux . Many administrative commands and system calls are reserved to root.

Use if your question is not about the user, but simply about a device that has been rooted.

Root is a system user. It is rare to log in directly as root, but rather, users who are privileged enough gain root access for one command with sudo , or log into a temporary root shell with su .

In the world of (which runs on an Linux kernel), a rooted device is one where OS protections have been disabled, allowing processes to run as root, and thus do things they would normally be prevented from doing, such as reading all files on the device.

Not to be confused with CERN's ROOT framework for statistical analysis in C++, see .

See also:

3340 questions
491
votes
25 answers

Is there a way for non-root processes to bind to "privileged" ports on Linux?

It's very annoying to have this limitation on my development box, when there won't ever be any users other than me. I'm aware of the standard workarounds, but none of them do exactly what I want: authbind (The version in Debian testing, 1.0, only…
Jason C
  • 21,377
  • 10
  • 38
  • 33
434
votes
23 answers

How to check if running as root in a bash script

I'm writing a script that requires root level permissions, and I want to make it so that if the script is not run as root, it simply echoes "Please run as root." and exits. Here's some pseudocode for what I'm looking for: if (whoami != root) then…
Nathan
  • 73,987
  • 14
  • 40
  • 69
361
votes
27 answers

Determine if running on a rooted device

My app has a certain piece of functionality that will only work on a device where root is available. Rather than having this feature fail when it is used (and then show an appropriate error message to the user), I'd prefer an ability to silently…
miracle2k
  • 29,597
  • 21
  • 65
  • 64
262
votes
11 answers

How do I get the APK of an installed app without root access?

I'm trying to extract the APK file of an installed Android app WITHOUT root permissions. I thought that this was impossible, because all APK files for non-system-apps are located in /data/app, and accessing this folder requires root permission. Then…
pinas
  • 2,708
  • 4
  • 21
  • 33
212
votes
28 answers

Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?

I am continuously receiving this error. I am using mySQL Workbench and from what I am finding is that root's schema privileges are null. There are no privileges at all. I am having troubles across platforms that my server is used for and this has…
Chase
  • 2,123
  • 2
  • 13
  • 5
201
votes
15 answers

How to get root access on Android emulator?

I have All Android SDK versions(from 1.5 to 2.3.3), and I tried many methods for getting root in Android emulator. I don't use any Android device and test everything on emulator(AVD). I need to get root access in any one of the Android emulator to…
Preetam
  • 5,528
  • 10
  • 32
  • 39
186
votes
9 answers

MySQL user DB does not have password columns - Installing MySQL on OSX

I am trying to change MySql root password. What I have done is below. Install MySql-5.7.6 ~ .dmg(Community Server) and workbench. Turn off the server on OSX System preferences. Access MySql with console. The command was mysqld_safe…
Juneyoung Oh
  • 7,318
  • 16
  • 73
  • 121
185
votes
30 answers

MySQL root password change

I have been trying to reset my MySQL root password. I have run mysqld_safe --skip-grant-tables, updated the root password, and checked the user table to make sure it is there. Once restarting the MySQL daemon I tried logging in with the new root…
nick
  • 2,256
  • 2
  • 14
  • 14
173
votes
14 answers

How to set the context path of a web application in Tomcat 7.0

I know that I can rename my webapp (or it's WAR file) to ROOT but this is a terrible way to do it, IMHO. Now I checked out the tomcat doc & it says It is NOT recommended to place elements directly in the server.xml file So I tried doing it…
Chantz
  • 5,883
  • 10
  • 56
  • 79
171
votes
18 answers

Root user/sudo equivalent in Cygwin?

I'm trying to run a bash script in Cygwin. I get Must run as root, i.e. sudo ./scriptname errors. chmod 777 scriptname does nothing to help. I've looked for ways to imitate sudo on Cygwin, to add a root user, since calling "su" renders the…
Ken Bellows
  • 6,711
  • 13
  • 50
  • 78
131
votes
9 answers

Connect to docker container as user other than root

BY default when you run docker run -it [myimage] OR docker attach [mycontainer] you connect to the terminal as root user, but I would like to connect as a different user. Is this possible?
Andy59469
  • 1,674
  • 2
  • 13
  • 18
118
votes
11 answers

adb shell su works but adb root does not

I rooted my unlocked Galaxy S3 (SGH-T999) Now, I'm trying to run adb root from Windows Command Prompt, however, I'm getting adbd cannot run as root in production builds error. So, the very first thing I checked was whether my phone was really…
rumit patel
  • 1,891
  • 5
  • 23
  • 28
109
votes
12 answers

vagrant login as root by default

Problem: frequently the first command I type to my boxes is su -. Question: how do I make vagrant ssh use the root user by default? Version: vagrant 1.6.5
Mike D
  • 5,984
  • 4
  • 31
  • 31
98
votes
15 answers

"Warning: unable to build chain to self-signed root for signer" warning in Xcode 9.2

I'm attempting to migrate an Xcode project to another computer. It gives me the warning "Warning: unable to build chain to self-signed root for signer" and when it runs it crashes immediately similarly to what is shown in this Stack Overflow: App…
Chewie The Chorkie
  • 4,896
  • 9
  • 46
  • 90
94
votes
10 answers

What is the best way for checking if the user of a script has root-like privileges?

I have a Python script that will be doing a lot of things that would require root-level privileges, such as moving files in /etc, installing with apt-get, and so on. I currently have: if os.geteuid() != 0: exit("You need to have root privileges…
Paul Hoffman
  • 1,820
  • 3
  • 15
  • 20
1
2 3
99 100