Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [root]

The "root" account is the most privileged account on a Unix system.

1
vote
3answers
582 views

SSH + Change password using root

I'm trying to connect to various servers to change the password of a specific user. I need to build a Script to do that thing, the complexity is that I have to use sudo and send the password in order ...
1
vote
2answers
74 views

Using a different directory than /usr as standard

Is there any possibility to use a different directory than /usr as the standard directory to install things? I am asking, since I got an Endless OS system where /usr is read-only, thus not being able ...
1
vote
2answers
16 views

Set the password for the first build of openwrt

I want to build an openwrt source and set everything up through the menuconfig section But there are no settings to set the password Which part should I change or which section should I add? I am ...
0
votes
1answer
81 views

su: cannot open session: Permission denied

I'm getting "access denied" attempting to login as root on the console and via ssh (Yes, I know root ssh access should be disabled - I've just inherited this box). I can login as non-root user who has ...
5
votes
2answers
568 views

Error when running ((x++)) as root

I make bash script temp.sh with the following content: age=0; ((age++)); When I run it as a normal user, it runs fine. But when i run it as root I get error: ./temp.sh: 4: ./temp.sh: age++: not ...
4
votes
1answer
931 views

Create, as a regular user, a tar with files owned by root

I want to build a tar file as regular (non-root) user with some prepared binaries and configuration files like this; etc/binaries.conf usr/bin/binary1 usr/bin/binary2 that are mean to be extracted ...
2
votes
1answer
2k views

Content of root's home directory in OSX

What is stored in root's home directory on OSX? What happens if you delete it on accident? Here's what's in my current root home folder. OSX:~ root# ls -lash total 8 0 drwxr-x--- 5 root wheel ...
81
votes
5answers
36k views

Why is root login via SSH so bad that everyone advises to disable it?

Everybody on the Internet advises to disable root login via SSH as it is a bad practice and a security hole in the system, but nobody explains why it is so. What is so dangerous in enabling root ...
1
vote
3answers
6k views

How to install Python on CentOS without root privileges?

For some reasons, I need to install Python on CentOS without root privileges. Since without root, one cannot use yum to install packages, so I tried ./configure --prefix=$HOME/tools/python make make ...
0
votes
2answers
10k views

How to autologin as root to mint 17.1

I would like to know how to autologin as root on mint 17.1? I've been able to login as root from the login screen (by enabling root access in login window settings and changing the theme to clouds). ...
0
votes
1answer
50 views

If - Else statement: determining whether the user is the administrator

read -p "What is your name?:" ANSWER if ["$ANSWER" == "root"] then echo "Hello, administrator" else echo "Hello, $ANSWER" fi If I answer "root" in the console, I assumed to ...
2
votes
2answers
2k views

Meaning of root in GRUB config file

Referring to here, with a configuration as grub> root (hd0,0) grub> kernel /vmlinuz-i686-up-4GB root=/dev/hda9 grub> boot The preceding is usually sufficient to boot a Linux box. The ...
2
votes
3answers
28k views

How to operate as root in GUI?

Following the standard recommendation I use my Linux system with a normal account and switch to root only in special cases. When browsing the file system using GUI sometimes an error pops up - You do ...
0
votes
1answer
34 views

Can I extract an overwriting tar archive, while retaining the ownership of the original destination file(s)?

I have a particular use case, where I want to extract a tar archive (as root) and intentionally overwrite some destination file(s) with the contents of the archive. This is all fine and easily ...
0
votes
1answer
2k views

Root access denied in LiveUSB of Portues

I am on Live Linux USB of Porteus linux and I copied it to RAM. I want to access root folder for making changes so that settings gets saved. but this is showing up
0
votes
1answer
27 views

Cannot edit crontab from service

I'd like to schedule a daily autoshutdown via sudo service autoshutdown start or either abort it via sudo service autoshutdown stop. /etc/systemd/system/autoshutdown.service [Unit] Description=...
21
votes
3answers
3k views

What script could allow regular users to use network namespaces?

I have an architecture using network namespaces (netns). I would like to allow regular users to do some operations in these netns. I could write a script netns-exec.sh, inspired by this post, ...
0
votes
0answers
30 views

How to list all services (daemons) on a Unix system that can be started by current user, but that will run as root?

How to list all services (daemons) on a Unix system that can be started by current user, but that will run as root? I'm studying cyber security and plays with capture-the-flag machines to enhance my ...
10
votes
6answers
87k views

How to run google chrome as root in linux

when I want to run google chrome as root, an error message with this title appears: Google chrome can not be run as root and the body of message is: to run as root, you must specify an ...
0
votes
1answer
34 views

Ubuntu 16.04 root password suddenly not working(even after resetting) [duplicate]

I disabled password for login at User Account setting, and later when I ran sudo, I get "Sorry, try again." It seems my previous password doesn't work anymore. I also tried hitting enter directly but ...
5
votes
1answer
786 views

Can I add iptables rule from the inside of a C Linux program only with capabilities or do I need necessarily root?

I need to add an iptables rule from the inside of a C Linux program. How should I do? Do I need root privilege or can I just grant some capabilities? I tried granting CAP_NET_RAW+iep and using popen(...
3
votes
4answers
44k views

adding a sudoer in debian

After a long search on the web, trying everything I can find I came to ask you guys, how can I add an existing user to be a sudoer? I've tried usermod -a -G sudo user and also adduser user both ...
3
votes
1answer
2k views

Cannot bypass login screen with correct credentials and no errors in Kali Linux

Today I downloaded the latest VMware image of Kali Linux (Kali Linux 64 bit VM). After that, I configured the hostname in /etc/hostname and adapted also the /etc/hosts to set permanently a hostname. ...
-1
votes
2answers
85 views

What is the root password for raspbian jessie or debian 9

What is the default root password for raspbian jessie or debian 9? I have Raspbian Jessie stretch iso "Raspberry Pi Desktop" or pixel Virtualbox and I need to install keys with root "su", what is the ...
1
vote
1answer
39 views

Can still cat/tail/head/etc. a file without the read permission

So as root, when I try to cat a file without the read permission, I can still see what's in it, which seems kind of strange, because as root I cannot write to a file without the w permission (it opens ...
3
votes
1answer
75 views

Power of a root process to inspect memory

I know on a Linux machine, if a process is able to get root privilege, it can access parts of the file system it normally wouldn't have access to. I want to ask whether a rooted Linux process can ...
1
vote
2answers
1k views

Cracking root user: Automating logging into root using “su” from nonroot user

I want to write a script that allows me to pass a password to the su command. The reason for this is to automate the process of logging into root from nonroot account. From my basic understanding of ...
2
votes
0answers
180 views

Why the “ passwd ” command give the root shell without password?

I have a Fedora server in which every time I execute passwd it automatically logins to root with no password necessary: Also, passwd is unable to change root password. Furthermore, root account is ...
3
votes
3answers
970 views

How can I test if a file in /root exists without su to root?

My OS is Ubuntu 14.04 LTS. I got a file /root/1.txt, and logged in with 'yu', who doesn't have read permission on this file. When I use the code if [ -e /root/1.txt ] , it returns false. I know I can ...
-1
votes
2answers
45 views

reestablish root shell

I disabled the shell of user root with the command chuser shell=/bin/false root and now I cannot switch to root with sudo su -. PermitRootLogin is disabled too, so I don’t know how could I reestablish ...
0
votes
2answers
1k views

Is it possible to make a standard user that can gain NO access to root?

I've set Kali Linux as the OS on a remote PC. Users will be connecting to it via SSH and I want to prevent them from gaining root access or using su or sudo command. I'd like to disable a variety of ...
2
votes
0answers
4k views

checkPermissions Missing write access to /usr/local/lib/node_modules

I tried to install the npm install pug, could not because of the permisions, got this: checkPermissions Missing write access to /usr/local/lib/node_modules However im logged in as as root Linards:~ ...
0
votes
2answers
53 views

How to extend root partition by shrinking home

Recently I've found out that soon I will run out of space on my / (root) partition. I've done some research on extending root partition, however, it wasn't too informative (mostly everyone say it's ...
1
vote
4answers
3k views

Cannot reset root password via grub

I am using Redhat Linux 5. I forgot the root password i set while installing linux OS. After rebooting right after the installation, entering root password is needed of course. So the following is ...
0
votes
1answer
21 views

readonly for root ( -i flag disabled )

here's my problem : a friend set me a readonly bad wallpaper on ubuntu gnome. I want to change it. : ) I found the file i have to modify : /etc/dconf/db/local.d/locks/00_default-wallpaper but when ...
3
votes
2answers
3k views

Why sudo user can use sched_setscheduler SCHED_RR while root can not?

I am running Arch Linux on a Raspberry Pi 2. I have a user-space program that uses Gordon's wiringPi library and, in particular, the piHiPri() function that attempts to set the highest priority for ...
9
votes
2answers
24k views

System Crontab or Root Crontab

System crontab: /etc/crontab Root crontab: sudo crontab -u root -e Which way is preferred? As they all run tasks within administration privilege.
4
votes
3answers
3k views

Privilege escalation detection?

Everytime when I read about some local privilege escalation exploit (e.g. this). I wonder if an OS can detect that there is someone logging in as root (or new root process starting)? Imagine a Gnu/...
1
vote
1answer
1k views

Which tasks/commands can't be executed with user gid=0 but uid≠0 on Linux [duplicate]

In a Linux server I will have an user with gid=0 but it's uid won't be 0. As there are many commands with root:root and execute permissions for group I know there will be a lot of administrative task ...
0
votes
1answer
65 views

How to avoid password prompt when starting Synaptic?

Whenever I start the Synaptic package manager, it asks for a password. How do I make it skip that dialog? I'm using Debian 9.8.
0
votes
0answers
48 views

How to unlock the login for the root?

How to unlock the login for the root? In Ubuntu 14.xx and previous versions of Ubuntu, it was possible to log in to the graphical session as root. Now i can't do this anymore. How to unlock the root ...
0
votes
3answers
1k views

Command not found error - bash

$ which sudo emacs /usr/bin/sudo /home/user1/local_build/bin/emacs $ sudo emacs /etc/apache2/sites-available/000-default.conf sudo: emacs: command not found $ emacs /etc/apache2/sites-available/...
5
votes
1answer
440 views

How to bind to a privileged port from a non-root process, on a Synology NAS

I want to run a custom DNS server (NxFilter to be precise) on a Synology DS115j NAS, which of course binds on port 53. This works when running as root, but I want to lock down the process now. This ...
20
votes
8answers
52k views

Vim Error E138: Can't write viminfo file $HOME/.viminfo!

I'm afraid I've run into something rather strange. When I open a file normally, vim README.txt, everything is fine. But upon sudo vim README.txt, the file renders blank, and gives me a E138: Can't ...
0
votes
3answers
2k views

Storing text files inside root directory

I am currently in the /bin directory. I am trying to create a text file of the content of the /bin directory and direct it to be stored in another file within the /root directory. I have entered the ...
-1
votes
3answers
4k views

how to create user that have same permission as root in CentOS 7?

how to create user that have same permission as root in CentOS 7?
2
votes
1answer
37 views

Switch to root user always failed after modifying /etc/pam.d/common-password

I'm using ubuntu 18.04. To strengthen my pass-word policy I modify my /etc/pam.d/common-password like this: # here are the per-package modules (the "Primary" block) #password requisite ...
0
votes
1answer
946 views

Valid root/user passwords not working on EC2

There is an authentication failure when I'm trying to enter password for any of my accounts after an update using yum. My authentication got broken, while everything else works. The updates were ...
0
votes
1answer
122 views

Docker running an app with NET_ADMIN capability: involved risks

I'm trying to run an app in a docker container.The app requires root privileges to run. sudo docker run --restart always --network host --cap-add NET_ADMIN -d -p 53:53/udp my-image My question is: ...
6
votes
2answers
853 views

Why doesn't root need the password to run “sudo” even when “NOPASSWD:ALL” isn't written in /etc/sudoers [duplicate]

In /etc/sudoers, there is always: root ALL=(ALL:ALL) ALL However, the root user (with UID 0) doesn't need to enter password when they run sudo command. For other users, a password is required ...