Questions tagged [root]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
38 views

aplay produces no audible output for non-default user, but verbose status looks ok?

I am writing a python script which utilizes a Raspberry PI's GPIO and thus the script must be elevated to run as sudo in order to obtain correct privileges for /dev/mem and /dev/gpiomem and access the ...
3
votes
1answer
2k views

Setting the root PATH for su [duplicate]

When I am changing (on my debian box) to the root user with su, apparently the PATH is not correctly set. Some vital directories like usr/local/sbin are missing. In /etc/profile I have the following ...
0
votes
1answer
62 views

How to switch user root to user to root to kill parent process?

I am developing a complicated automation script that will automate a large portion of my build, install, deploy and post installation processes. The problem is that within all of the commands that ...
0
votes
0answers
80 views

Crontab is deleting my jobs or reverting to a previous state?

I have found a similar problem (Crontab resetting itself) but it does not provide much insight. I am new to using crontab and am having the same problem with my crontab be reverted to a previous state ...
-1
votes
3answers
820 views

Know password, but can't SU or run commands with sudo [closed]

This issue popped up about a week ago, not sure what caused it. Previously the environment had been working as expected. Using a VM hosted on VMWare tools, uname -a returns roughly the following. -...
2
votes
1answer
364 views

How does Magisk on Android work as su without setuid and capabilities?

I've read in another answer that on Android the su binaries avoid needing to be setuid by using filesystem capabilities like cap_setuid. But then I tried to check this, and to my surprise, I found no ...
1
vote
0answers
238 views

Why is root always logged in from ttyS0 (even after system reboot)? [closed]

I am continuously seeing root in the output of the w command on a virtual machine hosted on the cloud. I have restarted the machine several times and even tried sending CtrlAltDel from the OpenNebula ...
3
votes
3answers
85 views

Sudo tickets and subsequent non-sudo sibling process

Imagine that locally on my system sudo is configured with a timeout, so that once I authenticate after running sudo once in some terminal, I don't need to re-authenticate for another 10 minutes. Does ...
5
votes
2answers
4k views

debian su - and su $PATH differences?

$ su - Password: # echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # exit logout $ su Password: # echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games I have ...
0
votes
1answer
458 views

insufficient permissions for device

While using the command adb root the output I obtained is adb: unable to connect for root: insufficient permissions for device: verify udev rules. See [http://developer.android.com/tools/device.html]...
1
vote
1answer
97 views

/etc/sudoers: why is there an entry for root? [duplicate]

We are distributing a standard sudoers file to our Linux servers. From an historical point of view the line .. root ALL=(ALL) ALL has been removed or never added. The package default ...
2
votes
1answer
81 views

Is this good configuration of my SSH server for the local network only root access?

Intention I would like to permit SSH root access to my server, but for security reasons from local network only. Environment OS: GNU/Linux Debian 9 Stretch fully updated. SSH: OpenSSH version 1:7....
0
votes
1answer
2k views

cannot create directory Permission denied - even when using sudo

I am trying to install gsl-2.5 - https://www.gnu.org/software/gsl/. I have used the command sudo ./configure && make && make install, but still run into permission problems: libtool: ...
-1
votes
2answers
47 views

Is there a workaround the sudo permission? [closed]

I just got assigned the task to install and compare two software packages for linux but I don't have sudo permissions to do so. Is there a work around it? Is this even possible? Another question ...
0
votes
1answer
256 views

Ubuntu - Root user cannot see $JAVA_HOME variable expanded to $PATH [duplicate]

I have created a variable $JAVA_HOME in `/etc/environment' JAVA_HOME="/usr/lib/jvm/jdk" PATH="...bla bla bla:$JAVA_HOME/bin" I also edited /etc/profile to have source /etc/environment so that all ...
1
vote
1answer
35 views

My script needs write access to /dev/sdX. How to avoid runnig it as root?

I'm developing a Bash script that handles formatting and testing (with f3) of massive amounts of USB drives, like this: mkntfs -QF /dev/sdX I used to simply run that script as root: sudo MyScript....
-2
votes
1answer
688 views

Installing MySQL without Root Access on CentOS

I'm trying to follow the instructions here. 1) I can't find CentOS listed as an operating system on the MySQL website. So I downloaded the mysql-8.0.11.tar.gz from the MySQL website: MySQL Community ...
1
vote
0answers
123 views

du command shows larger size than nand erase block size in ubifs. How to check the exact size in ubifs?

I use UBIFS for rootfs. I would like to check the size of each direcotries in /. When I checked with du command, it shows larger than mtd size. Would you tell me the way how can I check the correct ...
0
votes
3answers
222 views

Prevent script from sudoing

I have a script that runs an utility every two days. This utility does some stuff on my system. It is a very known, widely used piece of open source software. #!/usr/bin/env bash #...do stuff here ...
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 ...
1
vote
2answers
3k views

(root) FAILED to authorize user with PAM (Permission denied)

When tailing /var/log/cron i noticed that the cron job is failing due to PAM permissions. In my access.conf i do have the following uncommented to make sure (or what i thought was making sure) that ...
0
votes
0answers
74 views

Root/non-root user permissions to edit file

I am running scriptA.sh as root. Inside the script I need to echo data into FileA. FileA is owned by user1. FileA is located under /usr/local and has the following permissions: -rw-r----- 1 user1 ...
2
votes
1answer
362 views

How to prevent root login from GNOME 3 login screen (Arch Linux)?

I am running an up-to-date installation of Arch Linux and GNOME 3.28. For security reasons I don't allow root login in the consoles. I have done this by configuring /etc/securetty. However, it ...
0
votes
1answer
174 views

Is there a way to disable only root login via serial console on RHEL6?

I'm trying to disable root login via the serial console in RHEL 6. Based on this link from redhat (https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Security_Guide/s2-...
4
votes
0answers
1k views

Gain root access without using root's login shell

I bricked the login of my root user by removing zsh while it was still the default shell. Now as a result will login in fail, since on login will it try to use /bin/zsh(1), which is missing. Only one ...
1
vote
2answers
660 views

Kali Linux Can't Log in as non-root user and wireshark complaining about root

When I opened wireshark (fresh install of live usb kali with persistence) for the first time it complained about me being root. This is what I found in googling it: Yes it's recommended and ...
22
votes
3answers
4k views

What determines which Linux commands require root access?

What determines which Linux commands require root access? I understand the reasons why it is desirable that, say, apt-get should require root privilege; but what distinguishes these commands from the ...
1
vote
1answer
231 views

/sys/kernel/debug/dynamic_debug/control not writable, follow xhci_hcd debug guide

I want to follow this tutorial. But I can't write to /sys/kernel/debug/dynamic_debug/control- or [debugfs]/dynamic_debug/control-file as suggested by the guide, even tough I am root, the special ...
0
votes
1answer
1k views

How do I create a service on CentOS running as a different user than root?

I'm using CentOS 7. I want to run a nodeJS script as a service but run the service as the "rails" user. As root, I created the file /usr/lib/systemd/system/myservice.service, with the contents [...
0
votes
1answer
293 views

How to access /root directory from a browser?

Disclaimer : This question is meant to be answered for Educational and learning purpose. /root is an important directory meant to be only accessible to Root user. Accessing /root through a browser ...
0
votes
2answers
128 views

Big security problem in Nautilus 3.28.1

In my Arch Linux installation with Gnome 3.28, I recently noticed that I can enter with Nautilus in the private directory /root and see the files inside while Nautilus is started without root rights. ...
0
votes
1answer
97 views

What does “a process have superuser privileges” mean?

From APUE If the process has superuser privileges, the setuid function sets the real user ID, effective user ID, and saved set-user-ID to uid. If the process does not have superuser privileges,...
5
votes
1answer
616 views

unshare --map-root-user switch to original uid/username after setup

I'm using unshare to create per process mounts, which is working perfectly fine by unshare -m --map-root-user However, after having created my bind-mounts by mount --bind src dst I want to change ...
1
vote
2answers
63 views

How can I prevent ROOT from deleting a directory, but still allow root to have full control of all files and subdirectories within it?

chattr +a would be perfect if it only applied to the root of directory, not everything from there on. Is there a way to limit chattr to just the one folder (e.g. the opposite of -R as is normally ...
0
votes
0answers
363 views

cannot find a valid baseURL for repo : pgdg94

bonjour j'ai un soucis pour l'installation de postgresql dans mon serveur sme 9.2 a chaque fois que j'essaie de l'installer avec la commande yum install on m'affiche un message d'erreur "error:cannot ...
1
vote
2answers
78 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 ...
0
votes
2answers
224 views

Run a bash script as root user which has a sudo command in the script

New to Linux - I'm using Debian 9. I want to run a script to install pwndbg, following the tutorial here. I'm using my root account to do so and want to install it to my root account's home directory....
2
votes
1answer
2k views

why i can get root after running system(“/bin/sh”) in c file?

I am currently logged in as seed and after running test.c, on my Ubuntu system, I get root permission. I am just wondering why system("/bin/sh") can make a such change? Firstly, I su root and compile ...
2
votes
2answers
1k views

Give read permission to non-root user for root owned file?

How can I allow reading specific root owned files by a non-root-user executed process? I'm running node.js under Linux/Ubuntu. I do not want to run my process with root authorization, but must have ...
0
votes
1answer
99 views

What's the best, secure way to share some .bashrc source between users and root?

How's the best, secure way to have /root/.bashrc and /home/user/.bashrc include a common .bash.shared file? In other words like this: /root/.bashrc --sources--> .bash.shared <--sources-- /...
0
votes
0answers
278 views

Use sudo to preserve ownership of created files (do not be owned by root but by user)

My question is simple but I couldn't find answers I need to use sudo npm install but I need the files installed to have my user's ownership, not root's. For example: sudo touch a will give me a file ...
0
votes
1answer
762 views

How to Run Root Aliases being a non-root user?

I am running Linux 4.4.0-116-generic Ubuntu + KDE ( x86_64 GNU/Linux ) I want to run an alias named ksession that kills a particular session. At the same time I want that only I can run this alias ...
1
vote
2answers
938 views

Checking for root user in sh and bash [duplicate]

I am attempting to write a script that automates the installation of ports/packages on new FreeBSD installs. To do this, the user who executes the script must be root. The system is "supposed" to be ...
1
vote
0answers
27 views

How can I list which users can login without key auth?

I have recently been charged with a large amount of Ubuntu servers that are exclusively accessed via private/public SSH authentication. There is no information regarding how these servers were ...
-4
votes
1answer
213 views

how to add Unallocatated disk to lvm2 root in fedora? [closed]

my lvm2 root in fedora already full, and i have 20.30GB unallocated disk, but i cant use Gparted to use it, so is there any method to move that unallocated disk??
2
votes
2answers
224 views

How to run jhbuild as root

I have installed jhbuild and set the PATH variable to $PATH:~/.local/bin. Now when I run jhbuild command I get error: You should not use jhbuild as root user and when I change the user to non-root and ...
0
votes
1answer
79 views

Copy a file via drag and drop to `/usr/local` [closed]

I have a file mathpass (without a file ending .*) in /home/patrick/Documents and want to copy it via drag and drop to /usr/local. If I do so, a message Access denied. Could not write to. appears. ...
0
votes
1answer
4k views

sudo su in bash error “Cannot execute help: No such file or directory”

I installed zsh and changed root shell /bin/bash to /usr/bin/zsh. Then I rebooted and typed sudo su. It said "Cannot execute help: No such file or directory". So, I typed sudo bash. However, when I ...
1
vote
0answers
163 views

root user renamed as qroot - unable to su or sudo

Mysteriously, on our public SSH server, root user is now showing up as qroot. All the files owned by root are now owned by qroot. id qroot shows qroot is UID 0 /etc/passwd file is owned by qroot /...
0
votes
2answers
114 views

Linux file permissions changes

I see my file permissions are changing automatically , to test I have kept the permssions chmod 750 to all alert file in /var/log/snort-* after some time when alert file updated the permission got ...