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
13
votes
7 answers

Run a service with Root privileges or adding permissions with root

I am currently developing an app that reads out SMS/Emails while driving. Many users wished support for WhatsApp / KakaoTalk. However, as there is no "official" way to receive their messages, there would be only three options, all requiring…
Force
  • 6,312
  • 7
  • 54
  • 85
13
votes
3 answers

Read command output inside su process

firstly I will present my situation. I need to execute "su" command in my android app and it works well. Then I need to execute "ls" command and read the output. I'm doing it by getting the output stream from the "su" process and writing my command…
glodos
  • 1,203
  • 3
  • 13
  • 21
13
votes
4 answers

Packer can't execute shell provisioner as sudo

I have a shell provisioner in packer connected to a box with user vagrant { "environment_vars": [ "HOME_DIR=/home/vagrant" ], "expect_disconnect": true, "scripts": [ "scripts/foo.sh" ], "type": "shell" } where the content of the…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
13
votes
1 answer

How can I run as root on Heroku?

I tried using sudo to run a command on Heroku. Then I get a message that I cannot use the sudo command on Heroku. My real question is: How can I run a command with root privilege on Heroku, because it is required for some of the commands I'm trying…
13
votes
8 answers

Update user password in Mysql 5.7

I wrote an installation script to change the root password with this SQL command: UPDATE user SET password='*C563415623144561...' WHERE user='root'; This doesn't work on Mysql…
Tobia
  • 9,165
  • 28
  • 114
  • 219
13
votes
2 answers

set mouse position on rooted android device

Kind of related to this. On a rooted Android phone, how do I set the position of the mouse from within an app. (The mouse is a bluetooth mouse.) The other question mentioned it's possible with root or ADB, but not how.
Jeroen
  • 413
  • 1
  • 4
  • 16
13
votes
3 answers

Bash PS1 shows $ instead of # for root

When logging into root, the default prompt when echoed is \s-\v\$, which shows as bash-4.2#. I am trying to play around with the bash prompt so it displays the working directory. export PS1="\w \$". The prompt displays correctly, however, the symbol…
dook
  • 1,213
  • 1
  • 13
  • 30
13
votes
4 answers

XML Serialization of List - XML Root

First question on Stackoverflow (.Net 2.0): So I am trying to return an XML of a List with the following: public XmlDocument GetEntityXml() { StringWriter stringWriter = new StringWriter(); XmlDocument xmlDoc = new…
Matthew Grima
  • 1,513
  • 5
  • 25
  • 40
13
votes
1 answer

permanently drop root privileges on modern Linux

After start up I'd like my Linux program to drop root privileges and switch to a non-privileged account. I've found various examples online but nothing canonical for my requirements, specifically: this is a permanent drop both (e)uid and (e)gid…
bfallik-bamboom
  • 445
  • 5
  • 12
12
votes
3 answers

Get root access inside mssql docker container

I created a MSSQL docker container based on the official image provided by Microsoft (https://hub.docker.com/_/microsoft-mssql-server). I started a bash shell inside the running container and tried to delete some files. sudo docker exec -it sql1…
Zheng
  • 129
  • 1
  • 3
12
votes
8 answers

Check if a user is root in a java application

How can i verify if a user is root in a java application? Thanks
sssssssdddds
  • 121
  • 1
  • 1
  • 3
12
votes
3 answers

How to determine if any system dialog is displayed?

How to check if any system dialog (like the one below or USSD) is displayed in Android ? Programmatic way or cmd root way? Any variants.
ilw
  • 2,499
  • 5
  • 30
  • 54
12
votes
1 answer

How to run Anaconda Python on sudo

Currently using AWS to run some tests on a machine learning project. I would like to run Python scripts without internet (via root) because the internet bandwidth is extremely limited. I try to run the convnets.py script by doing sudo python…
emilywhou
  • 354
  • 1
  • 4
  • 12
12
votes
1 answer

Django: Creating a superuser with a custom User model

I replaced the built-in auth user model with a custom model that requires email to sign in. What happens now though, is that I can't create a superuser. Here are my models: class CustomUserManager(BaseUserManager): def create_user(self,…
lulu
  • 261
  • 1
  • 4
  • 16
12
votes
7 answers

Wamp phpMyAdmin error #1045 - Access denied for user 'root'@'localhost'

This is quite common problem and I found a lot of tutorials to help me solve it, although, there is one additional problem with my case... This is my config settings in config.inc.php $cfg['Servers'][$i]['verbose'] =…
MateuszC
  • 481
  • 2
  • 5
  • 14