Questions tagged [non-root-user]

Use for questions where tasks usually considered as "system-administrative" are to be performed by a regular, non-admin user, and/or for tasks or configurations that should not be performed system-wide but only apply for one such user (e.g. local software installation). Don't use for questions about a specific way to gain root privileges if there is an appropriate tag for that available.

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

Why isn't this command from this script run by the user specified by doas -u when this script is copied and run by an ansible playbook?

I wrote a simple playbook, open-links.yml, that is meant to run a script on one of my remote hosts: - name: Run Bash script hosts: myhosts gather_facts: false vars: au: "j" tasks:...
John Smith's user avatar
0 votes
0 answers
46 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 ...
abby rj's user avatar
-1 votes
1 answer
58 views

Why do my files only appear when the drive is unmounted?

Background I'd like to store music on /dev/sda1, which is a physically separate drive. The /etc/fstab contains: # grep "music" /etc/fstab UUID=10...92 /mnt/music ext4 defaults,user,rw 0 2 ...
Dave Jarvis's user avatar
0 votes
1 answer
98 views

Can I (install and) use guix-home on a non-Guix Linux distribution?

I'm interested in setting up an environment of apps, libraries and utilities for use - independently and in conjunction - by a non-root user on a GNU/Linux system. Can I use GUIX's "home" ...
einpoklum's user avatar
  • 9,513
0 votes
1 answer
304 views

how to add PID inside cgroup.procs with non-root privileges in cgroup-v2 in Ubuntu

I created cgroup in /sys/fs/cgroup. I called it testGrp and I need this cgroup to be controlled by non-root user so I changed the ownership of the whole cgroup directory /sys/fs/cgroup$ sudo chown -R ...
Belal Elkady's user avatar
0 votes
1 answer
208 views

Run one command as root within script

I have a script that I would like everyone (world) to be able to execute. However, one line in the script requires root privilege to run properly. How can I make this script work for everyone, ...
TSG's user avatar
  • 1,688
7 votes
1 answer
992 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/, ...
Village's user avatar
  • 5,025
0 votes
2 answers
80 views

Run part of command line command with sudo

I execute this time sudo nice -n -20 bash myscript.sh myscript.sh then processes some files as well as create files with the result. Two problems with this: the script is run as root the resulting ...
d-b's user avatar
  • 1,891
1 vote
1 answer
595 views

Install a package and its associated or required shared libraries (.so) without sudo access

I needed to install ffmpeg on my company's server without sudo access. Here is how I did it: Add $HOME/bin and $HOME/usr/bin to my PATH, and $HOME/usr/lib/x86_64-linux-gnu/ to my LD_LIBRARY_PATH ...
Đào Minh Dũng's user avatar
0 votes
2 answers
861 views

systemd / service user has not the same rights / permission as same user in a shell

I'm trying to set up the Hashicorp Vault Agent as a systemd service. I can manually run that agent with the user vault. Note, perhaps that's important: here's the /etc/passwd for that user : vault:x:...
IlliciteS's user avatar
0 votes
0 answers
237 views

Node JS Installation on CentOS using Root Login

I have installed node js( using sudo yum install nodejs) on centos 7 using root which seems find as root user but not accessible for other users. When I check as root user I am able to see version ...
Harish Kumar's user avatar
0 votes
0 answers
910 views

Different user other than "USER root" in Dockerfile while executing crucial "RUN apt-get..." commands

I recently experienced a Mass Email attack where someone "sniffed" my email and was using it as a "From:[email protected]" in the mass attack. I believe my email info get sniffed ...
python_mainly's user avatar
1 vote
2 answers
96 views

How I alias a hostname without root access vis-a-vis gethostbyname?

I'm running a program which does (in its source code): gethostbyname("whatever"); and I want it to use the local machine's address instead. I can't change the source. If I were root, it ...
einpoklum's user avatar
  • 9,513
5 votes
2 answers
1k views

touch command not able to create file in write-permitted directory

This is my user $ id uid=1000(pzk) gid=1000(pzk) groups=1000(pzk) This is my directory structure $ ls -tlrh total 12K d-w--w--w- 2 root root 4.0K Apr 13 10:53 write-for-everyone dr--r--r-- 2 root ...
pzk's user avatar
  • 117
1 vote
1 answer
89 views

Reverse setfacl without sudo or root

I have used command sudo setfacl -R -m u:ubuntu:rwx .. Unfortunately, by mistake on root directory, stopped it in a middle, but to late. I hoped to revere it by using sudo setfacl -bR / however now ...
Leszek J.'s user avatar
0 votes
1 answer
640 views

How do I switch users with their groups groups in Python?

How do I switch to an admin-user account from this python script named root_and_user.py that was run with doas or sudo? #!/usr/bin/env python3 from os import geteuid, seteuid from subprocess import ...
John Smith's user avatar
2 votes
1 answer
228 views

Why doesn't this script succeed from crontab as it does when manually run?

This script works when executed with doas ./backup_cron_root.sh #!/usr/bin/bash /usr/bin/crontab -l> "/tmp/cron.$(whoami).$(hostname)" && /bin/date>>"/tmp/cron.$(...
John Smith's user avatar
1 vote
2 answers
766 views

How to install Git on a CentOS 7 host as a non-root user?

As a non-root user, I want to install git (version = 2.38.1-1) on a shared host CentOS 7 server because the original version of git on the host is too old. I tried to use the method in this answer to ...
echo's user avatar
  • 31
0 votes
1 answer
344 views

how to check whether some dependencies are lack before a rpm package is installed by a non-root user

I am a non-root user on a shared centos7 server host.I try to install some softwares on this machine according to the method in the link. How can I check whether some dependencies are lack before ...
echo's user avatar
  • 31
3 votes
2 answers
6k views

Podman w/Docker Compose - run as user?

I'm trying out docker-compose with Podman which according to this is now supported. I run the instructions and can indeed hit the socket when running as root but when I try as user I get: permission ...
Grant Curell's user avatar
0 votes
1 answer
174 views

How to exit from root to user in the recovery menu?

A newcomer to linux here, I was trying to set a custom display resolution and make the changes permanent but looks like I've forgotten something and the login screen won't come up (the only thing I'm ...
user668687's user avatar
0 votes
0 answers
435 views

run openconnect without sudo

I want to start a VPN connection without needing to type in the password to the VPN connection or the password for sudo and without saving the password on my pc accessible to any normal users. ATM I ...
Jacknife's user avatar
1 vote
1 answer
630 views

How to add a non-root user when building a Docker image with Nix

I can use Nix to specify a Docker image: { pkgs ? import <nixpkgs> { } , pkgsLinux ? import <nixpkgs> { system = "x86_64-linux"; } }: pkgs.dockerTools.buildImage { name = "...
Matt R's user avatar
  • 385
1 vote
1 answer
265 views

systemd run fossil as non-root user

I want to run fossil as systemd service under non-root user. useradd -r fossil touch /etc/systemd/system/fossil.service fossil.service file: [Unit] User=fossil Group=fossil Description=Fossil ...
Anton Prokofiev's user avatar
1 vote
1 answer
373 views

Im having useradd error in arch-linux

Im installing arch-linux for the first time and im following a video on youtube and im creating a non root user with the command '' 'useradd -G wheel.audio.video - m nour11''' But im getting the error ...
Whoknows's user avatar
0 votes
0 answers
37 views

Ramifications of renaming a user [duplicate]

I'm setting up two computers with MX Linux that will be nearly identical, with a lot of customization from the original distro. I installed and customized the first one for User1, and will basically ...
fixer1234's user avatar
  • 681
0 votes
1 answer
75 views

Is there a user-level utility which offers the features of "cron" or "at" and only within a particular session?

I want to run a some scheduled commands on a timed basis within a manually startedscreen session and only within that screen session, because it uses an ssh authentication tied to that session. ...
vfclists's user avatar
  • 7,517
5 votes
3 answers
4k views

Best practices for running a rootless container as a systemd service with User= or --user?

I'm experimenting with running rootless containers with Podman as systemd services. I'd also like to run the services themselves with non-root privileges, either: a) as a system service, but with User=...
JK Laiho's user avatar
  • 161
0 votes
1 answer
720 views

Sudo Command Not Found for Plesk User

After adding a user to sudoers, it doesn't have access to run sudo. I'm really stumped as to what the issue is but I am running CentOs 7.9 with Plesk installed. I have added the main Plesk ...
zigojacko's user avatar
  • 153
0 votes
0 answers
70 views

Giving ownership and permission to non-root user from inside script

I have an automated process that installs a script on an Ubuntu 20.04 server as root, and then runs it, as root. Inside the script, I create a directory, say, foobaz and install an executable in that ...
hotmeatballsoup's user avatar
0 votes
0 answers
17 views

Categorizing Debian Linux VPS

I like to Categorize or Divide one Debian VPS for different Tasks and Testing. For Example two Apache Web Servers with no any connection between both. Something like installing apache2 web server only ...
zakadmin's user avatar
1 vote
0 answers
486 views

Figuring out which user is best to start pm2

I'm about to deploy a highly secure production server, which is running an nginx reverse proxy, which points to the backend server on nodeJS. When a user starts the server by typing in the "pm2 ...
Andrew Elkhoury's user avatar
3 votes
0 answers
192 views

Alternative to "gksu" in "su" mode for non-root users

On an Oracle Linux 8 installation, I am trying to implement a desktop launcher for the GNOME shell where the (graphical) program is to be run as a different (non-root) user. However, I want to enforce ...
AdminBee's user avatar
  • 22.8k
0 votes
1 answer
182 views

blocking commands as non-root

This is a very specific request, I am afraid. I am a non-root user at a CentOS Linux 7 machine. The admin team is normally very helpful but there is zero response for that case, unfortunately. So I ...
P. Dobro's user avatar
0 votes
0 answers
56 views

can something like --rsync-path be done with scp?

scp is handy sometmes because of its -3 feature. Systems here are configured to disallow root login, however sudo is configured to allow certain folks to pass --rsync-path=sudo\ rsync. i'd like to ...
gregrwm's user avatar
  • 71
6 votes
1 answer
9k views

How to allow non root users to access root directories?

I want to secure my linux server by not permitting the root user to login. For this I've created another user with: useradd username mkdir /home/username/ mkdir /home/username/.ssh chmod 700 /home/...
Vueer's user avatar
  • 163
0 votes
1 answer
66 views

Creating a soft link

I'm trying to create a soft link for a file but keep getting a permission denied message. I don't want to create it under the root user but a different user I have created. This user has rwx ...
clulesslinny's user avatar
2 votes
1 answer
4k views

How to make a loopback device writable for normal user?

I setup a loopback device following this guide. The device is OK, but only writable for root. I searched solutions and found some answer such as using fusermount, fstab etc., e.g. this one. I would ...
xrfang's user avatar
  • 215
0 votes
1 answer
80 views

Can I require per-user AuthenticationMethods when switching from a non-root user to a root user?

I currently SSH into a root user from another machine with an SSH key & 2FA, so I set AuthenticationMethods publickey,keyboard-interactive. If possible, I would like to be able to SSH into a non-...
angryserver's user avatar
0 votes
0 answers
267 views

Unmount without sudo

I know that I can declare in /etc/fstab that a user can mount and unmount a partition without root permission using user(s). But I seem to be unable to achieve the same in a mount command without ...
xeruf's user avatar
  • 551
1 vote
1 answer
119 views

Installing software by ./configure, make, make install

I have access to a computer through SSH, and need to install Davinci Resolve without the root access. I only have access to the command line, and cannot use sudo for installation. The documentation of ...
Mehran's user avatar
  • 11
1 vote
0 answers
17 views

Catch the root command exit code from a regular user [duplicate]

I've been researching umount exit codes for some error cases, running the following command repeatedly: $ sudo sh -c "umount /home; echo $?" And got surprisingly strange results. The error ...
tsul's user avatar
  • 111
1 vote
1 answer
416 views

Custom daemon: which user could I use to run as, to avoid using root?

I want to write a daemon that launches after boot, before login, that does background communication over USB-rawhid with an Arduino microcontroller. I would like to run this daemon as non-root. I ...
Bram's user avatar
  • 879
0 votes
2 answers
863 views

Is it possible to install Clash on the Server without root access?

I asked this question a few years back but it seems like it is not useful for all softwares. I am in the same scenario but with different software. Is it possible to install Clash on the Server ...
Adnan Ali's user avatar
  • 141
0 votes
0 answers
71 views

Permission to read /var/log/ files on separate system (Chrome OS Linux terminal)

I need to access two drives which won't boot to their original systems (Raspberry Pi OS on SD card & Ubuntu 20.04 on HDD). As both of these devices are (mostly) inaccessible, my only option is to ...
Tinker's user avatar
  • 1
0 votes
1 answer
818 views

What's the most appropriate directory where to place development software shared between users?

About share data (files and directories) among users within the same machine, has sense use the /srv directory it according with: What's the most appropriate directory where to place files shared ...
Manuel Jordan's user avatar
2 votes
1 answer
373 views

In a user namespace as non-root, on a nosuid,nodev filesystem, why does a bind mount succeed but a remount fails?

In a Linux user namespace, as non-root, I bind mount /tmp/foo to itself. This succeeds. Then, I try to remount /tmp/foo to be read-only. If /tmp is mounted with nosuid or nodev, then the remount ...
mpb's user avatar
  • 1,611
2 votes
1 answer
1k views

Non root user is not able to open any ports

I have an embedded Linux System built using Yocto. Just out of build, it only had a root user. I created a new user. This new user is not able to open any ports on the system even though they are ...
skjoshi's user avatar
  • 131
3 votes
2 answers
1k views

Why would having a user without a password be a bad idea (in this scenario)?

I thought about whether to post this here or in security SE... but decided to go with Unix SE since this isn't really a question about cryptography stuff but more about Linux users / privileges. Maybe ...
zpangwin's user avatar
  • 771
1 vote
1 answer
316 views

Change the Owner access Charlie root to user at a media device, possible?

how can I change owner access from Charlie root to user access for my media devices (partitions /media/da0s1) on FreeBSD?
gertzh4uj's user avatar

1
2 3 4 5
9