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.

2
votes
1answer
51 views

Cannot su into root default shell - Debian

I am using a Debian 9 server. Usually I access via ssh to a normal user (say user1) and su into root, because I disabled ssh into root. Lately I was setting up a git-server where I created a user git ...
0
votes
1answer
36 views

Passwordless (key based) SSH Access to a Linux system from a MAC?

New Edits: So I went back and did some significant testing and revised my opinions about my problem a little. First, here's a link to a thorough and quickly graspable diagram of the SSH Handshake (...
1
vote
3answers
35 views

“su doesn’t record the commands executed as root”

I am currently reading book Unix and Linux system administration - Evi Nemeth. On page 70 under the topic "su: substitute user identity" there is a statement that says "su doesn’t record the commands ...
20
votes
8answers
53k 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 ...
1
vote
1answer
50 views

$PATH: output showing malicious program?

I read that using echo $PATH, for NON-root users should resemble: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/username/bin: I read that using echo $PATH, for ROOT users should resemble: /...
8
votes
4answers
14k views

What does it mean to be in group 0?

Several users in a system I inherited have their group set to 0 in /etc/passwd. What does that mean? Do they essentially get full root privileges? The system is running CentOS 5, and the users ...
3
votes
3answers
19k views

What is the function of user group root? [duplicate]

Possible Duplicate: What does it mean to be in group 0? I wanted to avoid using SSH root login to backup my remote server. Thus I set up a non-root user account on the server and place it under ...
22
votes
3answers
4k 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, ...
11
votes
1answer
2k views

Accidentally renamed tar.gz file to a non tar.gz file, will my file be messed up

I was trying to move a tar.gz file to /opt directory and accidentally move it /root/opt thinking it was the right place. But there was no /root/opt, so the tar.gz file renamed to opt inside the /root ...
0
votes
0answers
20 views

Restrict root shell access

Background : 1. I have two users admin and root. admin user is not in sudoers and only runs a menu of restricted commands. 2. root account access is restricted to shell based protocols like scp, ssh ...
4
votes
2answers
2k views

Acecssing NFS share without root privileges

I want to access an NFS share from within a Docker container. I don't have control over how that Docker container is started, so I can't run it in privileged mode etc. But honestly, I don't even want ...
10
votes
7answers
89k 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 ...
1
vote
3answers
599 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
77 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
20 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
184 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
602 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
988 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
51 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
3k 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
36 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
37 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=...
0
votes
0answers
38 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 ...
0
votes
1answer
65 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
804 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
45k 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
162 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
44 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
184 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
1k 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
5k 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
75 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
86 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.