Skip to main content

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"

Filter by
Sorted by
Tagged with
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 ...
BhaveshDiwan's user avatar
  • 11.1k
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,...
Dimitris Sapikas's user avatar
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. ...
Mussnoon's user avatar
  • 5,086
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 ...
Malabarba's user avatar
  • 10.3k
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.
Lincity's user avatar
  • 25.5k
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] ...
user251948's user avatar
  • 1,531
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.
user283163's user avatar
  • 1,459
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?
Pandya's user avatar
  • 36.1k
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/...
pcgeek's user avatar
  • 1,271
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 ...
ava's user avatar
  • 1,123
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!
DrKenobi's user avatar
  • 6,452
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?
Takkat's user avatar
  • 143k
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 ...
5YrsLaterDBA's user avatar
  • 1,105
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 ...
Eliah Kagan's user avatar
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 ...
wayneeusa's user avatar
  • 969
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-...
yurividal's user avatar
  • 1,802
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 ...
spqa's user avatar
  • 823
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 ...
Sohel Ahmed Mesaniya's user avatar
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 - ...
arun nair's user avatar
  • 779
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 ...
Rob S.'s user avatar
  • 1,641
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 ...
Gilles 'SO- stop being evil''s user avatar
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:~$ ...
Alex F's user avatar
  • 1,909
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 ...
Ashot's user avatar
  • 661
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 ...
NES's user avatar
  • 33.3k
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 ...
Matthew Wilson's user avatar
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. ...
Zac's user avatar
  • 623
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-...
Alex Chapiro's user avatar
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 ...
αғsнιη's user avatar
  • 35.9k
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 ...
Charles Kane's user avatar
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 ...
Martin Fejes's user avatar
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. ...
Alan's user avatar
  • 2,770
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 ...
FirstName LastName's user avatar
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 ...
rubo77's user avatar
  • 32.8k
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?
Renjith G's user avatar
  • 3,563
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 ...
pastim's user avatar
  • 900
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 . ...
user278122's user avatar
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 ...
VidathD's user avatar
  • 2,744
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 ...
jeop's user avatar
  • 411
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?
Hemanth's user avatar
  • 1,045
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 ...
Raja G's user avatar
  • 103k
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 ...
Zignd's user avatar
  • 10.8k
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 ...
Randy Ssusage's user avatar
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 ...
David Graça's user avatar
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 ...
Ankur S's user avatar
  • 661
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 ...
Patryk's user avatar
  • 9,206
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?
The Forgotten King's user avatar
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.
Andy Castille's user avatar
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 ...
Abhishek Divekar's user avatar
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 ...
Dwight Mitchell's user avatar

1
2 3 4 5
36