Questions tagged [root]
The "root" account is the most privileged account on a Unix system.
1,200
questions
1
vote
2
answers
44
views
how to correct "unknown root shell" in shell in a box
I'm having problem of directory due to a typo in a command I wrote in my command
I made a typo while writing this command
chsh -s/usr/local/bin/bash/<username>
instead of using this chsh -s/usr/...
0
votes
0
answers
33
views
How should a shell script check whether it is running with root privileges? [duplicate]
I'm writing a bash script which I only want the root, or a root, user to be able to run. What is an idiomatic/recommended way for the script to check whether it is running as root / with root ...
1
vote
1
answer
58
views
Setting `ulimit -l unlimited` for non-root user
I am playing with llama.cpp on OpenBSD-current. The program has a --mlock flag to force loading the model into physical memory (i.e. disable mmap). However, running as a non-root user gives warning: ...
0
votes
1
answer
76
views
Safe dockerfile for SSH server, server keys permission
I'm trying to design an SSH server in docker, so I can wire it up with other containers like snort and fail2ban to run before the ssh connection.
I'm trying to make it as safe as possible. It's known ...
0
votes
1
answer
79
views
How to make the superuser appear in the SDDM user list?
I'd like to be able to log in as the superuser via SDDM without having to manually enter its username. I'd consequently like to have it appear amongst users (created via KDE Plasma 6's kcm_users).
0
votes
3
answers
50
views
What minimum linux's root partition size for virtual machine
I wanna install multiple linux distro (Ubuntu, Fedora, Manjaro, Opensusue, etc) via virtual machine (qemu) with shared /home partition for testing purposes, which i'm not gonna install anything big or ...
0
votes
2
answers
126
views
Lost sudo. Beyond salvation?
I made a mistake and gave a container Homepage access to the docker.sock and briefly after I discovered that sudo is no more.
sudo
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /etc/...
0
votes
1
answer
43
views
Unreadable file as root on NTFS HD
I have an NTFS partition on an HD. This partition contains 6 files which I can't read in any way. I have tried reading them as root, doing chmod, chown and mount -o rw,remount ... nothing worked.
# ls ...
1
vote
1
answer
162
views
Fedora - Migrate root filesystem to new drive / partition
I need a quick bit of help. I've migrated my /root and /home directory off a BTRFS partition to and EXT4 partition, because, for some strange reason .. BTRFS always fail! .. However, now that the EXT4 ...
0
votes
0
answers
42
views
What caused USER to have "root" as OWNER and GROUP instead of the user's name? How do I change it?
/home (machine 1)
PERMISSION | OCTAL | OWNER GROUP NAME
drwxr-xr-x | 755 | root root .
drwxr-xr-x | 755 | root root ..
drwxr-xr-x | ...
0
votes
2
answers
59
views
My user account is no longer a su, and I don't know the root password. What are my options?
In Kubuntu 23.10, while updating my account photo in the System Settings > Users GUI, I must have accidentally changed my account type from Administrator to Standard, as I'm no longer a su. I guess ...
0
votes
0
answers
54
views
Need password authentication while runing "systemctl stop .service"
I am looking for a way to add one more password authentication to run
systemctl stop abc.service
via root access.
I am using Rocky Linux.
I have no idea if it is even possible. Please help.
0
votes
1
answer
88
views
How to programmatically determine whether superuser elevation is necessary to invoke code?
When providing code to another, it appears to be good practice to remove all elevation-specific code — that is, provide apt update rather than sudo apt update (or su -c 'apt update'). However, this ...
0
votes
2
answers
211
views
Run shellcode as root in a buffer overflow attack?
I'm trying to exploit the following code:
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv){
char buffer[100];
strcpy(buffer, argv[1]);
return 0;
}
with ...
0
votes
2
answers
266
views
How to automatically source your bashrc file when you become a root user [duplicate]
At my work work we work with multiple people on several RHEL servers.
I always login to my Linux servers as my regular user (duh).
Assume I have a added extra functions/aliases to my .bashrc file. Is ...
0
votes
1
answer
48
views
How to login as root user after deleting system-auth
I wanted to use an old password for my account.
I am using OpenEuler OS distribution.
After searching on Stack Exchange, I found this link.
How can I reuse an old password?
I followed the exact same ...
1
vote
1
answer
116
views
No DNS for root?
It seems my configuration for root doesn't have access to DNS even though my lower-privileged user does.
$ ping google.com
PING google.com (142.251.32.110) 56(84) bytes of data.
64 bytes from 142.251....
0
votes
1
answer
221
views
Files created by user in a mounted partition show root as owner
I have a dual boot system (Windows 10/Archlinux) and I have created a NFTS partition which is mounted at startup via /etc/fstab so I can access it from both OS'es.
The fstab file shows that the ...
2
votes
1
answer
1k
views
How does rfkill work without being root (or using sudo)?
I saw this statement at the end of this answer:
PS: I have no idea why rfkill works when run as an unprivileged user. On my Mint, it doesn't have a setuid or setgid bit.
I was curious, and looked on ...
0
votes
0
answers
58
views
dpkg pip-installs wheels as 'root' user
I've created a DEB package containing a bunch of Python wheels which the postinst script pip installs. The problem is that because the DEB file apparently has to be run as sudo, e.g. dpkg -i acme-...
0
votes
0
answers
85
views
Xorg failed to find /root/.local/share/xorg/Xorg.0.log Advice
I am currently working on a display manager for linux using the startx command.
The program is running as root (as a display manager normally does) and then drops to a normal user (in this case ...
-2
votes
3
answers
6k
views
can not open access to console the root account is locked (kali linux)
when I start my computer, I have this message:
can not open access to console the root account is locked
I had a quick check on the web and I found this:
How to fix "can not open access to ...
1
vote
0
answers
30
views
permission denied even as root [duplicate]
❯ ./my-project
zsh: permission denied: ./my-project
I just make a partition out of my hard drive (not the same drive with root) with type ext4 so i think it should be fine using it on my linux.
# /...
0
votes
1
answer
99
views
Home folder in /etc
I was yesterday trying to mount a partition & playing around with firejail, when I realized I have a ${HOME} folder (written just like that) in my /etc folder, even if my home folder is in the ...
0
votes
0
answers
59
views
How to disable root account on MacBook Pro if I don't know root password
I bought a used MacBook Pro 2017 from a reseller but I found restrictions in accessing many places. Then I realized this machine is already configured with a root user which I don't even know. How ...
1
vote
0
answers
24
views
What does -p argument do in this command "/bin/bash -p " [duplicate]
if we have the SETUID and SETGID set for the bash binary.
-rwsr-sr-x 1 root root 108424 Mar 10 2020 /bin/bash
and we execute the command: /bin/bash -p
we will find ourselves escalated to they ...
0
votes
1
answer
49
views
New notebook and factory partition
First time using a linux, I'm using Debian 12. My notebook arrived with the following partition (512gb SSD), in this order (left to right in the disk viewer):
/boot/efi - 537mb
/root - 20gb
recover (...
1
vote
1
answer
433
views
Is there some universally recommended Reserved block count (for root) for large Ext4 drives?
By the following question:
Is there some universally recommended Reserved block count (for root) for large Ext4 drives?
I specifically mean the following:
Let us consider (almost) everyone has a ...
0
votes
0
answers
88
views
noinitrd is ignored, always runs initrd copy of /init
I use an initrd currently on an imx8 processor that uses buildroot for a base filesystem. (kernel is 5.10.52)
For debugging purposes, I want to bypass the initrd and load the filesystem I copied to a ...
3
votes
1
answer
595
views
effective vs real user ID : why doesn't it return root as effective ID in my example?
I did some reading about the difference between real and effective user ID. I thought I understood, but I have a doubt : according to my comprehension, in the example below the command $ id -un should ...
1
vote
2
answers
228
views
Installing ufw as root vs installing using sudo
Is there any security issue if I installed ufw as root instead of a non-root user using sudo?
I checked Not installing as root but the answer related to what I am installing as I understand.
0
votes
2
answers
2k
views
Can't enter in sudo on Debian 12
I'm sitting on a Virtual Machine on Debian 12, the password for root is simple, it's the letter q, but when I write, say, sudo -i and enter the password, the terminal only displays Sorry, try again. ...
0
votes
1
answer
920
views
Is setting CONFIG_STRICT_DEVMEM=y safe?
I was playing around with /dev/mem and found out that even as root user you cannot access the whole file if CONFIG_STRICT_DEVMEM=y.
It was new to me that there are mechanisms to prevent the root user ...
-2
votes
1
answer
701
views
Root password shows incorrect in terminal but is correct in system [duplicate]
I am using debian 12.1.0. I setup a root password while installing but when I go in terminal and use sudo, it prompts me to enter password. I enter it and it shows incorrect. Then I went to settings ...
0
votes
1
answer
93
views
Is it possible to grant a specific privilege to a user without sudo?
I'm not going to add sudo in my Buildroot environment for RPi 3 B+ since I just need apache2 to update my system time with date -s TIME.
Is there a way to grant this permission without installing and ...
1
vote
1
answer
190
views
Logout other users from KDE/plasma as root
I'd like to be able to automatically log out users from their KDE/plasma sessions by a script running as root. The log-out should happen "gracefully", i. e. applications should get a chance ...
0
votes
1
answer
88
views
du report wrong usage and root folder is so big
In Debian the /root/ directory is so big but du show nothing inside it. root account is just a supervisor/administrator/superuser user, there is no folder for this account in home directory. This ...
0
votes
0
answers
118
views
Not Enough Space in /ROOT Partition [duplicate]
I need help locating the specific file that has filled my root partition and the cause of inconsistent file storage usage.
this is the output of my df -h
Filesystem Size Used Avail Use% Mounted ...
0
votes
1
answer
2k
views
how to run pulseaudio systemwide as root on debian?
I added these lines into /etc/systemd/system/pulseaudio.service file:
[Unit]
Description=PulseAudio system server
[Service]
Type=notify
ExecStart=pulseaudio --daemonize=no --system --realtime --log-...
0
votes
1
answer
460
views
Can www-data control root files on Ubuntu web servers?
I have read about a bazillion posts about how to set up web server ownership, directory, and file permissions.
I have heard use root. Don't use root, use www-data. Don't use that, use a different user ...
1
vote
1
answer
187
views
How can I run Doccano as the root user without knowing my root password on EC2?
I use Doccano on an AWS EC2 instance running Ubuntu 22.04.
To run Doccano, I use doccano webserver --port 8000.
But now I'd like to have Doccano serve its webpages on port 80. Therefore, I have to run ...
7
votes
1
answer
1k
views
How to log into CUPS admin with Debian "rootless" system?
When I installed Debian 12, I was given the option to not allow root logins. Instead, the system lets me use su each time I need to do some minor maintenance.
When I go to http://localhost:631/, ...
1
vote
1
answer
218
views
Which first level directories in Linux should be owned by user?
Today, I have accidentally noticed that the following directories of the / are owned by user, rather than root:
/home
/lost+found
/media
/mnt
/opt
/snap
/srv
/swapfile
/var
I have no idea how that ...
0
votes
0
answers
897
views
How can I run a service that depends on xdg-desktop-autostart.target as root?
Is it possible to run the ExecStart command in a systemd service with root privileges while depending on either xdg-desktop-autostart.target or graphical-session.target? If so, how?
For some context, ...
0
votes
0
answers
108
views
How can I force linux to limit the amount of time I play "games" on it per day, that would be protected from root override?
Problem:
Struggling with video game addiction.
https://www.reddit.com/r/Steam/comments/v0wj7i/is_there_a_way_to_limit_gaming_time/ Virtually no existing ways to limit gaming, outside therapy.
I need ...
0
votes
1
answer
893
views
Unable to reboot remote machine over ssh
I am working with an embedded system and would like to initiate a reboot from a remote machine.
I have tried various methods, including
ssh -o StrictHostKeyChecking=no root@${HOST} /bin/systemctl ...
0
votes
0
answers
32
views
Why root user needs `sudo` to execute some commands [duplicate]
When I switched to root user using su command, I still need to use sudo reboot instead of reboot to reboot the system, otherwise bash returns
bash: reboot: command not found
Why is that the system ...
0
votes
2
answers
75
views
How does su detect fakeroot?
If I run su, it asks for the password of the target user. If i run it as root, it does not ask for a password. But if I run it in fakeroot, how is it possible that it will ask for a password? Should ...
0
votes
1
answer
114
views
Changing a root's file on external drive from another system
If I use one system to format an external drive (not an encrypted partition, just a standard filesystem) and then create a file owned by root and then mount that drive on another system, will I be ...
0
votes
2
answers
2k
views
How to use PAM to allow 'root' access only from local terminal?
I am new to PAM and its quite complex to pinpoint a specific module or config file, thus asking this.
I want to allow root access only from the console i.e if someone is physically present on that ...