Questions tagged [root]
root is the default administrative account for Unix-based systems. It is comparable to the Administrator account of a Windows system.
556 questions
1 vote
1 answer
181 views
Are there any Linux systems where the home for root is not /root?
I am looking at a script and it contains these two lines: HOME="$( grep ^root: /etc/passwd | awk -F ':' '{ print $6 }' )" export HOME This of course loads the variable named HOME with /...
0 votes
1 answer
676 views
Almalinux - Extending root partition from 4 GiB to 14 GiB
I am trying to extend the disk space on an AlmaLinux server (running on a VM). The goal is to add unallocated 10.00 GiB to the root partition (dev/sda2). What is the best way to do this without losing ...
1 vote
3 answers
2k views
Why does "python3" have a different version than "python3.12" when they are soft linked?
In /bin, I ran: $ ls -l python3 lrwxrwxrwx 1 root root 10 Aug 8 01:44 python3 -> python3.12 $ python3 --version Python 3.12.3 $ python3.12 --version Python 3.12.5 Can anyone explain why one is &...
0 votes
1 answer
584 views
ssh root@host not working despite proper config - what's missing?
I need to temporality enable root SSH in a Fedora 40 workstation with key. SSH client logs confirms that the proper key is sent and accepted (copied below). sshd debug logs (also below) show the same, ...
0 votes
1 answer
190 views
Why can I connect to the docker daemon with sudo, but not root?
Consider the following sequence of commands. When I try to connect to the docker daemon as a regular user, or root, I can't. When I use sudo (both as a regular user and root) I can. Why is this? [john@...
0 votes
1 answer
67 views
Centralize .ssh/authorized_file amonst many linux servers
We have many Linux servers. The requirement is all Linux servers log in into each other password-less with root user. The problem is if a server is added / removed / reinstalled its SSH key needs to ...
1 vote
1 answer
179 views
ZFS list - root mounted twice?
I've followed this guide to install ubuntu with root on zfs. I've skipped creating all the dedicated (sub) datasets in step 3.3. Now "zfs list" looks like: NAME USED ...
0 votes
1 answer
597 views
How to start a sudo-privilage program with screen so that I can re-attach to it later?
Here's the problem I face: I have a program that must run as root. I want that to run in a screen, but here's a twist: for admin reasons, I want to be able to re-attach to it. I'm writing a dirty and ...
0 votes
1 answer
194 views
get user with crontab root
I run myscript.sh scheduled in the root crontab and I need it to detect the non-root user (with which the system starts). I have tried these variants: local_user=${who -m | awk '{print $1;}'} ...
0 votes
0 answers
48 views
Many files were changed to root as owner by GCP. Can't delete them!
Many files had their ownership changed to root in GCP and now I can't remove them. How do I change it back? GCP help is hard to come by. Thanks, -Marcos
2 votes
2 answers
4k views
Should I use my personal admin user or create a dedicated 'ansible' user for SSH in Ansible?
I'm starting learining and using ansible and struggling a bit with the user ansible uses for ssh. Is ansible supposed to use my personal admin user to ssh onto the invetory hosts and escalate ...
0 votes
2 answers
1k views
Use original linux user bashrc also as root user
I extended the bashrc file of my linux user. This file contains extra aliases, functions, whatever is useful. It's synchronized with a playbook across our 100+ servers. When i'm working on linux I ...
0 votes
1 answer
2k views
VMware ESXi 7.0 U3j Can't login via root after a few minutes
I can't login via root user at the moment . If I do a hardware reboot on the server , the problem is solved and I can login for just once before I'm locked out again after like 5 minutes . I have read ...
0 votes
1 answer
425 views
i am root but ufw status says 'command not found'
as simple user, first I pass root with command : su I am now root on Debian 10 buster. When I hit ufw status, I have 'command not found'. But it works with sudo ufw status When I use su -, the command ...
0 votes
0 answers
1k views
Unable to login as root user
[Ubuntu server] I was able to login to the server just fine for days. And now I cannot login with the root user with password and private key both are not working. Luckily I am currently logged in as ...
0 votes
1 answer
1k views
Why create a new user with sudo privilege when you are the only person manage the server?
Please share some true use cases of benefits when you are the only admin of manage VPSs, I'm just hosted my first WordPress site. A lot of guide I read online suggests creating a new user after update ...
1 vote
0 answers
263 views
Samba server issue with mount point being owned by root instead of 'force user' specified in smbd.conf
I've created a samba share on an ubuntu server called teslausb with the following lines specified in smbd.conf: [teslausb] comment = John's home share on Ubuntu path = /mnt/sdb1/teslausb ...
0 votes
1 answer
87 views
Add an aliases user root2, results changing the owner root to root2
Am looking to add an alias for the root user to log to the server with a different password So I followed this advice https://serverfault.com/a/870301/429729 by using the following command useradd -o -...
1 vote
1 answer
4k views
mariaDB 10.5.12 access denied for [email protected]
fresh installation of mariaDB 10.5.12 on debian 11 was hardened with 'mysql_secure_installation' script, question "Switch to unix_socket authentication [Y/n]" was answered with 'yes'. Now ...
1 vote
2 answers
1k views
Sshd root login errors even though root logins are disabled - how to solve?
On my Linux server (Ubuntu 18.04.6 LTS) I have set PermitRootLogin no in /etc/ssh/sshd_config and reloaded the config with sudo service sshd reload But I am still seeing Mar 14 06:18:02 myhost sshd[...
20 votes
9 answers
12k views
root login or sudo user for server administration?
I'm trying to understand the technical arguments/security implications between ssh'ing with root directly, or making an auxiliary sudo user in the context of maintaining a server. To clarify, we're ...
0 votes
1 answer
616 views
How to disable Root Access, to VPS, via SSH?
I run a VPS, on a Linux Server, with CentOS 7 (64 bits) being the chosen Operating System. I have recently wiped the VPS, so it only has a clean install of Plesk Onyx at the moment. I would now like ...
0 votes
0 answers
2k views
ufw failed to be initialized
I just make a fresh Docker container. But, when I try to enable ufw, I get the following error message: # ufw enable ERROR: problem running ufw-init modprobe: ERROR: ../libkmod/libkmod.c:586 ...
1 vote
1 answer
2k views
cron/php how to run command as a non root user
I need to run command (only one command) as a non root user from cron. Have tried two versions and both fails; Cron: * * * * * php script.php script.php: exec("whoami"); // returns 'root' //...
1 vote
1 answer
667 views
Should both root and wheel users own the files that originally were only owned by root?
Should a wheel user that was created to disable root login and secure SSH have the same ownership as root from a security point of view?
3 votes
1 answer
9k views
Amazon EC2 instance is out of space because "root" file is gigantic
I've been working lately on an AWS EC2 instance with ubuntu. This is my first experience working with servers, so I'm really new to this. Lately I've noticed my free space has completely filled up for ...
1 vote
2 answers
195 views
Is there a rights managment system for linux in company networks for local root support?
I work at a large research institute (10k users) with various systems (Mostly Windows and Ubuntu Linux). I am not an expert in such network structures but I work at home with Ubuntu myself and like to ...
0 votes
1 answer
3k views
nginx - subfolders alias include all subfolder
I'm currently trying to fiddle around with a location block that has a different root. However I have some issues when accessing files that are in a subfolder on the different root. Here is my broken ...
0 votes
1 answer
443 views
VM in Read-Only - no commands executed
A Ubuntu 18.04 LTS server VM has entered Read-Only Mode, to the point that basic commands such as ls are not executed anymore, and return the error message -bash: /usr/bin/ls: Input/output error, ...
1 vote
0 answers
281 views
How can a file be visible to a regular user but non-existent to root?
I have asked this question yesterday but it was marked as duplicate and closed because of its context, as it was thought to be an X/Y question, whereas I was just interested in the general matter of &...
0 votes
0 answers
120 views
Which permissions does a Linux executable file has when it is executed by root?
I am using CentOS 6.8. I have an executable called railgun, whose user and group are both set to root. I then use the root user to start it as a service, as below: service railgun start However, it ...
2 votes
1 answer
2k views
Is the root user able to administer screen for other users?
We're trying to rewrite a draconian screen session killer for users who leave their screen sessions up for an inordinate amount of time and have in some way or other circumvented our session timeouts. ...
1 vote
0 answers
50 views
Why a non-root installation can work across the whole cluster?
I recently installed anaconda (which includes a new python3) locally in my account folder on a cluster with a dozen of nodes (each node with several cores). I use it to install some package P that is ...
0 votes
2 answers
249 views
Is SSH remote execution more secure as local non-root?
Is there a security benefit running a command remotely via ssh as a local non-root user? In other words, is this actually more dangerous compared to executing the ssh command as non-root: root@local:~#...
0 votes
0 answers
439 views
Why is my Samba share only writable by root?
I have set up a Samba share, and it is only writable by root. For example, I can only create a folder on that share with sudo: ~$ mkdir /mnt/SHARE/somedir mkdir: cannot create directory /mnt/SHARE/...
1 vote
1 answer
683 views
namespace - nobody to root mapping
I'd like to create new user namespace being root with the command: # unshare -U bash $ echo $$ 3500 $ id uid=65534(nobody) ... etc After that I edit /proc/3500/uid_map im my initial namespace as root:...
7 votes
2 answers
7k views
Why is the root home directory, /root not in /home? (looking for reasons other than /home is mounted on a different drive)
i know that one reason for /root not being in /home is that usually /home is mounted on a different disk and if it were to fail, we still want root to be accessible. What are some of the other reasons ...
0 votes
1 answer
698 views
FreeIPA - ssh as root prompted for password
I know the access via root won't work (client sshd_config and restricted account in FreeIPA). But is there a way to blacklist root either on the host or on FreeIPA so it's denied immediately rather ...
0 votes
2 answers
483 views
Linux: Is it possible to use the ssh key pair instead or in addition to the root privileges?
I'm facing the problem of securing an embedded platform. All ssh hardening have been setup, including 2 factor authentication and login with ssh key pairs. Now, the root and user passwords are ...
3 votes
3 answers
2k views
Any point in running containers as non-root on openshift
The openshift documentation reads : To further protect RHCOS systems in OpenShift Container Platform clusters, most containers, except those managing or monitoring the host system itself, should run ...
0 votes
2 answers
176 views
Bash-script: run another script on bottom as an other user
I have a bash script that runs over crontab as root. On the bottom of that script I want to run another bash script as another user in a subshell (detached). How can I do that The normal command would ...
1 vote
0 answers
286 views
CentOS USER_CMD logs auditd
We are trying to start logging all executed commands by users (including root) on CentOS using auditd with type=USER_CMD, how we can do it? We already getting commands, starting with sudo, but not ...
0 votes
1 answer
73 views
Double call to root path "/" in a website
I'm checking my web page performance, but some strange reason it double calls to root path. Any idea why this is happening? Thank you.
1 vote
1 answer
7k views
Permission denied var/run/nginx.pid
I get the following error: Permission denied var/run/nginx.pid Inside my nginx docker container the problem is the user running is unprivileged user with a random userid (forced by my company ...
0 votes
2 answers
62 views
Running newusers util in cron to batch create users does not run [duplicate]
I'm attempting to batch create some users from a file using the newusers util on ubuntu 18. When running in cron as the root user, nothing happens. When I run the command manually, it works as ...
3 votes
0 answers
1k views
sshd on Fedora: Recent changes to UsePAM break existing security; PermitRootPassword & UsePAM no not honored, minimal PAM config doesn't work either
I did upgrade on a Fedora Server and was SHOCKED to discover thousands of root attacks on my publicly facing servers and I can't seem to figure out how to stop them! To be clear; It IS possible to log ...
0 votes
2 answers
2k views
How to run zabbix agent as root in Ubuntu 14.04?
We have some legacy servers which runs on ubuntu 14.04 and we need to execute zabbix-agentd as root for getting some performance information. zabbix-agentd version = 5.0 I've followed this guide but ...
1 vote
2 answers
3k views
Instance does not have a volume attached at root
I recently started trying out EC2 servers and came across an issue when trying to get an instance back up from a snapshot (which is another odd issue I had, because you can't change root snapshots in ...
1 vote
2 answers
733 views
root user terminal slower than non-root in Debian GNU/Linux 10 (buster)
I have to quantify slow here. It is noticeably slow, but not extreme. Here is a test I did. I pasted the below (time in nanoseconds command) on terminal as a non-root user and then as root user (I ...
1 vote
1 answer
4k views
Running script as user with root permissions
Due to conflicting and constantly changing permissions on mounted drives (which cannot easily be solved due to the development structure of programs), there is a script that must be run with root ...