Questions tagged [root]
In an Ubuntu system, root is the superuser, the owner of most system files. Questions about the root user or accessing superuser privileges may use this tag; the / or /root directories may be more appropriately tagged with "filesystem"
1,753
questions
539
votes
13
answers
1.1m
views
Execute sudo without Password?
Inspired by this question....
I am the sole person using my system with 12.04.
Every time I issue a sudo command; the system asks for the user password (which is good in its own way).
However I was ...
258
votes
14
answers
495k
views
How do I copy files that need root access with scp?
I have an Ubuntu server to which I am connecting using SSH.
I need to upload files from my machine into /var/www/ on the server, the files in /var/www/ are owned by root.
Using PuTTY, after I log in,...
223
votes
22
answers
169k
views
Why is it bad to log in as root?
I've often come across posts on forums or other websites where you see people joking in such a manner about running/logging in as root as if it's something awful and everyone ought to know about it. ...
170
votes
11
answers
186k
views
How can a script check if it's being run as root?
I'm writing a simple bash script, but I need it to check whether it's being run as root or not. I know there's probably a very simple way to do that, but I have no idea how.
Just to be clear:
What's ...
164
votes
5
answers
1.1m
views
How to enable root login?
I would like to enable the root account on my Ubuntu installation.
I realize the security implications of this.
153
votes
7
answers
641k
views
How do I run a 'sudo' command inside a script?
To do a patch manually I must type this command
sudo ./playback_delete_data_patch.sh 09_delete_old_data_p.sql
There is a space just before the 09:
sudo ./playback_delete_data_patch.sh [space] ...
145
votes
5
answers
966k
views
How to enable ssh root access on Ubuntu 14.04
I´d like to enable the ssh root access on Ubuntu 14.04. Editing the /etc/ssh_config (PermitRootLogin yes) didn't affect anything.
130
votes
12
answers
619k
views
/usr/bin/sudo must be owned by uid 0 and have the setuid bit set
I have run following command accidentally
sudo chown [username] -hR /
Now sudo su getting error:
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
How to Solve This?
127
votes
4
answers
1.4m
views
Changing from user to superuser
How do I change from user to superuser (root)? What command do I use in the Terminal to switch to root? I have tried --help but I get lost with all the listed help. I'm looking for a recent download/...
112
votes
4
answers
1.7m
views
How do I login as root?
I want to login as root, but when I enter
sudo -s
and enter password, this message is shown: "you are not in sudoers file", and when I enter
su
and enter password, this is shown: "authentication ...
110
votes
7
answers
61k
views
What is the difference between "gksudo nautilus" and "sudo nautilus"?
I've been using gksudo nautilus and sudo nautilus through Alt+F2.
What's the difference? They look very similar!
91
votes
1
answer
253k
views
How do I boot into a root shell?
When booting to the graphical desktop fails we sometimes are recommended to boot into a "root shell" or to boot in "recovery mode".
How do I do that?
86
votes
4
answers
1.3m
views
What is the default root password?
I installed Ubuntu 12.04 LTS (Precise Pangolin), 64 bit. Nowhere was I asked to set password for root.
I just installed AccuRev SCM software. It was installed under the /root folder by default. Now I ...
86
votes
3
answers
37k
views
When to use pkexec vs. gksu/gksudo?
There are two general ways to run applications graphically as root (or, more generally, as another user). Programs like gksu, gksudo, and kdesudo are graphical frontends for sudo. In contrast, pkexec ...
83
votes
6
answers
135k
views
Read / Write permissions in /opt directory
I installed Android Studio in my /opt directory without a hitch and have been using it. Recently, though, Android Studio informed me of an update. It won't perform the update, however, because it says ...
74
votes
10
answers
337k
views
How do I allow non-root access to /ttyUSB0?
Since I updated from Ubuntu 10.04 (Lucid Lynx) to Ubuntu 12.04 (Precise Pangolin), I am unable to access the device connected in /ttyUSB0 if I don't have root access.
To be more specific, I use a USB-...
71
votes
7
answers
146k
views
mysql doesn't ask for root password when installing
I used apt install mysql-server to install MySQL on Ubuntu 16.04 but during the installation, it did not ask for root password.
After installation I got ERROR 1045 when I tried to login as root and ...
71
votes
2
answers
414k
views
How to come out of root user?
I just gained root access following steps from the http://www.wikihow.com/Become-Root-in-Ubuntu. My prompt get changed from $ to # sign, indicating I have root access. Now I have come out or log out ...
66
votes
8
answers
610k
views
"No root file system defined" error while installing ubuntu
I am new to linux/ ubuntu and just downloaded the v11 of ubuntu to learn linux. I faced this "No root file system is defined" error while trying to install it. This is how I was proceeding -
...
66
votes
3
answers
99k
views
How do I disable remote SSH login as root from a server?
For security purposes my company wants me to not allow anyone to be able to log into our Ubuntu server as root remotely over SSH. We still want the root account to exist, we just do not want it to be ...
65
votes
6
answers
86k
views
How are administrators supposed to read root's mail?
What is the Ubuntu way for system administrators to receive system notifications, which typically take the form of e-mail sent to the root account?
Examples of such notifications are the output of ...
59
votes
4
answers
131k
views
How do I set persistent environment variables for root?
To create persistent environment variables, I add the script file to /etc/profile.d directory, for example:
# my script
export MY_VAR=var_value
This works properly for current user:
alex@alex-64:~$ ...
56
votes
5
answers
451k
views
How to change root password in ubuntu?
I am trying to change root password in my Ubuntu system.
This is what I did:
ashot@ashot-desktop:~$ sudo passwd root
passwd: Authentication token manipulation error
passwd: password unchanged
...
53
votes
2
answers
115k
views
Disable root account in Ubuntu?
I was asked for root credentials to setup my printer in Ubuntu. This seemed to be caused by a bug. And the suggested workaround is to create a root password. Since it is default that no root password ...
53
votes
6
answers
517k
views
How can I permanently grant root access to a user? [duplicate]
Possible Duplicate:
How do I grant sudo privileges to an existing user?
I've been searching for the answer to this but all I find is "It's not a good idea" or "We don't recommend it" and some ...
53
votes
8
answers
321k
views
How do I get permissions to edit system configuration files?
I can't seem to edit and save config files in the root system (eg: /etc/dhcp/dhcpd.config); it just says "permission denied" or the save option is blocked in the text editor.
I'm pretty sure I'm a ...
52
votes
4
answers
146k
views
Adding NOPASSWD in /etc/sudoers doesn't work
On 14.04 here. I SSHed into my machine, added the following line to /etc/sudoers:
myuser ALL=NOPASSWD: ALL
And then tried running:
sudo mkdir /etc/blah
...and I'm being asked for my password. ...
49
votes
8
answers
48k
views
Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
I installed Ubuntu 17.10. Now I am having trouble with gksu:
$ gksu -dg synaptic
No ask_pass set, using default!
xauth: /tmp/libgksu-HgUjgQ/.Xauthority
STARTUP_ID: gksu/synaptic/8760-0-alex-XPS-15-...
49
votes
7
answers
839k
views
How to run Terminal as root?
When we want to run a programs as root we use sudo, gksu, gksudo and etc. Now my question is how do we can run a Terminal as the root user in Terminal?
I tried with using gksudo terminal and gksu ...
49
votes
6
answers
194k
views
Change owner of internal hard drive partition from root to user
I have a number of drives internal and external. Some are partitioned. Most mount automatically at boot (all did at one point).
One partition is owned by root and therefore does not mount ...
47
votes
9
answers
240k
views
How to configure ADB access for Android devices?
I'm using Ubuntu 12.10 and I have installed Android SDK, set it's path in my user .bashrc and it works.
The problem is that my phone requires adb to be ran by root for permissions, but running adb ...
45
votes
4
answers
274k
views
How can I become the owner of a file/folder that root owns?
I had a bad habit of storing my wallpapers in /usr/share/backgrounds, and decided to move them all into Pictures. Well, the problem is that most of them are now read-only since they are owned by root. ...
44
votes
5
answers
50k
views
How to NOT become a root user? Are administrators root?
I installed Ubuntu on my PC. To log in, I use the username and password I created during installation. Does this mean I am a root user? If yes, then how do I become non-root? It looks like non-root ...
43
votes
2
answers
27k
views
.dbus folder in home folder belongs root
I have a folder ~/.dbus in my homefolder that is only read and writeable by root:
drwx------ 3 root root 4096 Feb 17 17:30 .
drwx------ 2 root root 4096 Feb 17 17:30 session-bus
Is this the ...
42
votes
14
answers
31k
views
Why is there no option to login as root?
Why does Ubuntu not allow the GUI users to login as root at the time of system start up like administrator in Windows?
Why they are restricting us to login only through the terminal?
42
votes
8
answers
53k
views
I need an equivalent of gksu in 18.04
I've read a lot of threads about gksu being removed from many Linux flavours, including Ubuntu 18.04. Many state that gksu is an abomination and no user should ever need to use anything like it. I ...
42
votes
5
answers
593k
views
cp - cannot create regular file : permission denied
I want copy to /lib/udev but gives error
cp -f /tmp/ok_pcscd_hotplug.sh /lib/udev
cp:cannot create regular file /lib/udev/ok_pcscd_hotplug : Permission denied
I am root , but I can't understand . ...
41
votes
5
answers
74k
views
Is it necessary to have a /home and /swap partitions in 20.04
Is it necessary to have a /home partition in Ubuntu Desktop 20.04? I read somewhere about a home file in /root partition...
Does the same go to the /swap partition?
Can someone set up a guide for New ...
41
votes
6
answers
80k
views
Cannot remove file from trash that was put there as root
I know about the dangers of using root access so please forego the lectures. I try to be careful and will be doubly so from now on.
I was using the file browser with root access in order to change ...
39
votes
9
answers
170k
views
How to find out root password for installing software
I'm trying to install the NetBeans IDE in my Ubuntu and in the process it's asking for my root password which I don't remember. I know my sudo user password. How can I recover my root password?
39
votes
2
answers
160k
views
How to make files accessible only by root?
I'm using Ubuntu and I'm here to know is there any way to modify access of a specific application so that it can only root has access to it?
Currently that application can be launched by general ...
39
votes
3
answers
560k
views
How do I set the root password so I can use su instead of sudo? [duplicate]
Possible Duplicate:
How to know my root password?
I'd like to define a password for root so that I can use su directly, without having to prepend it with sudo. And because I'd like to log in as root ...
36
votes
3
answers
14k
views
I accidentally ran "sudo umount -a" and now have no access to anything
Now I can't remount anything and get access back. How can I fix it?
sudo returns
sudo: effective uid is not 0, is /usr/bin/sudo on a filesystem with the 'nosuid' option set or an NFS filesystem ...
35
votes
3
answers
14k
views
Update/Upgrade not working (because of phased updates)
I've tried to sudo update and upgrade as usual but it displays
The following packages have been kept back:
base-files python3-distupgrade python3-gi python3-gi-cairo
ubuntu-release-upgrader-core ...
33
votes
12
answers
128k
views
How to run Dolphin as root?
I currently use Dolphin 17.04.3 and whenever I run it as sudo, it gives the following error:
Executing Dolphin as root is not possible.
without explaining why or giving an alternative.
How can I run ...
33
votes
2
answers
124k
views
What is the difference between 'su -' , 'sudo bash' and 'sudo sh'?
I would like to know what is the difference between
su -
sudo bash
sudo sh
I cannot login as root while doing su - because I do not have the root password - I mean I have my user password with ...
32
votes
6
answers
4k
views
What would happen if I created an account called 'root'?
If I created a user account in Ubuntu called root, would it automatically have root permissions?
31
votes
6
answers
307k
views
How do I open a folder as root?
More specifically the
/etc/apt/
folder. I need to delete some files and replace
/etc/apt/sources.list
with a newer version.
31
votes
5
answers
8k
views
Creating a Git repo at / (root) for tracking settings?
So I use Git mostly for development purposes, but I just realized that I could use it for storing versions of the settings files I have on my Ubuntu installation.
My proposed setup is:
git init a ...
31
votes
1
answer
127k
views
couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) [duplicate]
Fresh install of Lubuntu
Installed updates from synaptic
Installed wine and components from synaptic, upon what I assume is completion it popped this error code.
Is it something I should rush to ...