Questions tagged [privileges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Is there any way to start services from docker image, can't start pre-enabled systemd images (255)

I want to start some service from this section tryed everything up until now and run out of ideas. I have a debian 10 VPS with no root access and need i have been looking forward to find another way ...
user avatar
1 vote
1 answer
37 views

Is appropriate to use setuid() over setresuid()/setreuid()/seteuid()?

I have an executable binary which was compiled from a C source file The executable has the setuid permission on I noticed that, if the owner of the executable is root, I can use setuid(geteuid()); ...
user avatar
0 votes
1 answer
65 views

Find all binaries that require root privilege in a freshly installed Ubuntu 20.04 LTE

I am currently looking for the simplest way to find all binary files in /usr/bin and /usr/sbin directories that require root privilege to run, which means I should run them using sudo or by being root ...
user avatar
  • 111
0 votes
0 answers
29 views

debugger as a tool to get to root shell

according to the answer in the reference: Can gdb debug suid root programs? Claims that: "You can only debug a setuid or setgid program if the debugger is running as root. The kernel won't let ...
user avatar
-3 votes
1 answer
80 views

Why do package managers require root priveleges?

The default package manager for mainstream Linux distros (deb/apt, yum/dnf, pacman, etc) do global-installation by default and require root. I am curious about in the rationale for this design choice. ...
user avatar
0 votes
0 answers
97 views

bash setuid, to drop root privileges, without execing another program [duplicate]

I have a bash script, I don't want to run another script. I just want to continue running this one, but as an unprivileged user. I was hoping for a builtin that will do the syscalls setuid(getuid()) ...
user avatar
0 votes
0 answers
39 views

Give program/user rights for specific tasks

I'm writing a program that needs to perform some privileged operations without inserting any password, for example: use systemctl commands run superuser commands read/write files owned by root user ...
user avatar
  • 101
1 vote
1 answer
223 views

How to enable sudo privileges for user group to apt-get install anything

I want to give a group permission to install software without needing to input a root/sudo password. I'm on Linux Mint 20.3 Cinnamon. I have created a group called "basicsudo". I first typed ...
user avatar
0 votes
1 answer
107 views

Using doas with root password instead of user password

From my limited understanding doas allows to run any commands as root but by default requires you to enter your own password instead of a root password. How do i make it require root password instead?
user avatar
0 votes
0 answers
69 views

Is it possible to install a QEMU VM without admin privilege in which I can install nVidia GPU driver and CUDA?

Without host's administrator privilege (including being a user of a special group that has admin privilege), is it possible at all to install a QEMU VM in which I can install nVidia GPU driver and ...
user avatar
  • 33
0 votes
2 answers
27 views

Restricting a GUI user to perform only predefined actions on Ubuntu

I am the admin of an Ubuntu machine, which I want to let a user "guest" login to via GUI. This user should be able to perform only certain actions (like view the contents of some files ...
user avatar
  • 1
0 votes
1 answer
290 views

/etc/sudoers - clarification about "all" vs "all:all" for groups [duplicate]

About configuration(s) for the /etc/sudoers file with visudo I have read the following tutorials (among others): How To Edit the Sudoers File Linux visudo command A very important part is the ...
user avatar
0 votes
0 answers
16 views

Granting permissions to specific file [duplicate]

Is there a possibility to make only one particular user be able to grant permissions to only one file? to be more specific, imagine that there are 3 users on a computer User 1,User2,User3. Each has a ...
user avatar
  • 1
-1 votes
1 answer
243 views

Permission Denied on Yum Installation

i am trying to install yum on my Ubuntu Server 20.04, i am using an administrator user which has a root privileges (since i have added such administrator user to the root line in visudo). So i ...
user avatar
  • 99
1 vote
1 answer
185 views

In unix-like systems, is there an anonymous login and how to disable it?

I am a DevOps engineer working with AWS. My company is under a security audit and we got a report stating the following points: --- REPORT BEGIN --- Observation: In some EC2 instances, anonymous ...
user avatar
1 vote
1 answer
56 views

Privilege drop: Allow readonly access to file for unprivileged process on a readonly file system

An ideally least privileged process should be able to have readonly access to data on a filesystem, which itself is readonly. Hence this is the situation root@linux# ###(1) filesystem is untrusted + ...
user avatar
2 votes
2 answers
297 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 ...
user avatar
  • 317
1 vote
0 answers
356 views

Attempting to get root UID from root EUID

So here is the situation. I have a hypothetical system with 2 users - 'user1' and 'root'. The user 'user1' is just a normal non-sudoer user with uid=1000, and the root, is just a normal root user with ...
user avatar
0 votes
1 answer
6k views

nmap: Couldn't open a raw socket. Error: Permission denied (13)

I'm attempting to run the following command on an Ubuntu box (ssh from Windows 10 PowerShell): sudo nmap -sU -O localhost Starting Nmap 7.91 ( https://nmap.org ) at 2021-03-02 10:13 GMT Couldn't open ...
user avatar
  • 339
4 votes
3 answers
644 views

sudo -l privilege escalation

I am doing a ctf and I am in the last step of it --privilege escalation. With the sudo -l command, the output was this: Matching Defaults entries for nick on 192: always_set_home, !env_reset, ...
user avatar
25 votes
1 answer
4k views

Why it is possible for normal users to power off computer? [duplicate]

I used the command poweroff and unexpectedly the system went off. I didn't used sudo therefore I didn't expect computer to be turned off. Why it was possible for me to use this command without root ...
user avatar
1 vote
1 answer
78 views

strace and polkit

I have a program who refuse to run as root, he wants the "true user" to run it, but he wants privilege escalation during the execution to modify some protected paths With strace it's okay as ...
user avatar
  • 109
4 votes
2 answers
3k views

Allow an unprivileged user to start a webserver on port 80

I understand the security implications of allowing a non-root user to start a webserver on ports 80 and 443. I would like to remove the privilege check to allow any non-root user to invoke a webserver ...
user avatar
  • 193
5 votes
1 answer
2k views

What are the daemon user and group for?

I am configuring a web server on OpenBSD and I can see in /var/www/ that all directories except /var/www/cache/ are root:daemon. I then see that the user for the daemon group is daemon $ grep daemon /...
user avatar
  • 423
0 votes
1 answer
828 views

Accidentally deleted user, lost all user permission/privilege to sudo

This is my fourth day in Linux OS from windows. I don't know why I did it, but I enter this command sudo deluser <MYUSER> sudo. After entering the command, I lost all my sudo privileges. And ...
user avatar
1 vote
3 answers
794 views

If a user-mode process wants to change to kernel mode, does it always succeed?

Computer Systems: a Programmer's Perspective says In order for the operating system kernel to provide an airtight process abstraction, the processor must provide a mechanism that restricts the ...
user avatar
  • 90.7k
0 votes
1 answer
895 views

Linux "Sudo -l" Privilege escalation issue

Hi all I'm moderately new to Linux so hoping I can get some help.. I am currently running Kali Linux and trying to practice privilege escalation using sudo -l. As background, I currently am accessing ...
user avatar
1 vote
0 answers
36 views

Unprivileged reboot? [duplicate]

$ uname -a Linux msi 5.8.14-arch1-1 #1 SMP PREEMPT Wed, 07 Oct 2020 23:59:46 +0000 x86_64 GN> so I do a console login as a regular user, type reboot and it works. shutdown now as well. Why am I ...
user avatar
  • 2,643
0 votes
2 answers
63 views

Is there a way to create a "superadmin", i.e. a root user which can't be removed or whose permissions can't be changed by other root users?

Let's say a Unix system has two root users. Is it possible to prevent one of these root users from removing this user and to protect the ssh key access removal? The goal is to ensure if a user is ...
user avatar
  • 2,019
0 votes
1 answer
25 views

How can I give an access user01 to only reset password for user02 in CentOS 7?

I am trying to do it via visudo but I have no idea what I should type there. Any hint? At the beginning I tried to give him full root access to test: root ALL=(ALL) ALL user01 ALL=(ALL) ...
user avatar
  • 3
0 votes
0 answers
42 views

How to limit user to only cat & exit commands? [duplicate]

I would like to limit a user to only two commands: cat and exit. I've tried to edit visudo but it does not work. My OS version is CentOS 8.
user avatar
  • 11
1 vote
0 answers
255 views

Run Spring Boot application as non-root user on Ubuntu 18.04

I have a Spring Boot application that I would like to run as a non-root user on Ubuntu 18.04. Currently it is running as root, and everything runs fine, but this is not best practice and could lead to ...
user avatar
  • 11
2 votes
2 answers
220 views

Switch to other user instead root while using sudo

I would like to redirect (switch) one execution to other user instead root while using sudo. Example: sudo startup.sh will execute the startup.sh as root, but what is needed is for it to be executed ...
user avatar
  • 21
0 votes
1 answer
92 views

Supplementary groups' special permissions

After installing Wireshark I had to add my user to the wireshark group to be able to capture packets without root access. AFAIK Wireshark uses the libpcap library which itself uses the Netlink ...
user avatar
0 votes
0 answers
94 views

Proper way to grant root privilege to a task in a Python GUI app under Wayland

I'm developing a Python 3 software, that will be both a CLI and a GUI app, primarily targeting Linux. Here are the needs of my program: A small part of my program, let's say only a single function, ...
user avatar
  • 411
0 votes
1 answer
159 views

Create startup process that requires both root and other user

I'm trying to create a service that starts a process. I want the startup of the process to be able to do a few commands as root and then run the rest of the process as a less privileged non-human ...
user avatar
  • 745
2 votes
1 answer
298 views

Edit ssh_config without ssh connection on a remote VPS

Yesterday, I was busy setting up a remote server and securing it. I am a noob at code, programming and webhosting, but I am trying to host my own website. So yesterday I changed some settings in the ...
user avatar
2 votes
1 answer
274 views

CentOS 7, cronjob for user does not run script

I have CentOS 7.6 on a virtual machine. there some bash script at /opt which i need to run them with this user dbuser. these scripts write their output in a folder. Using crontab -e I put these in ...
user avatar
0 votes
0 answers
49 views

Can the process read the file? SetUID privilege collision

User A executes a setuid program owned by user B. the program wants to read a file in /etc/data, that is only readable by A and no one else. Can the program read the file? And then I have another ...
user avatar
  • 1
1 vote
1 answer
972 views

Run openvpn as non-root user

I'm trying to run openvpn server within podman unprivileged container. Openvpn needs to be able to manage network interfaces (i.e. create tun interface, assign IP address to it, bring it up). On my ...
user avatar
  • 121
2 votes
1 answer
3k views

Failed to mount "partition name" - "Not authorized to perform operation" - in Xfce Debian

I have Debian 10 with Xfce installed. I can't open any of my NTFS hard drives using icons on desktop and in Thunar. I can mount them with the mount command, though. My user is added to the sudoers ...
user avatar
  • 61
1 vote
1 answer
84 views

How can an owner / ACL change with su / sudo be refused because of missing privileges?

I've got a file owned by root, which must get write access for normal users (particularly user pi): pi@autoradio:/import/valen/autoradio $ ls -al autoradio.db -rw-r--r-- 1 root root 2887050 Nov 12 ...
user avatar
  • 317
0 votes
2 answers
36 views

Make changes to a mounted volume from inside Docker container appear as if performed by a regular user while also keeping root privileges

If I use the --user argument of docker run, changes (like a simple mkdir for example) will appear as if performed by that (non-root) user. However, I won't be able to run commands like apt inside the ...
user avatar
  • 1,976
4 votes
0 answers
191 views

Is there something like 'sudo' but give only one capability not real root?

I want to run a one-time web server on port 80, which I will never run again. Is there something like 'sudo' that gives only temporary CAP_NET_BIND_SERVICE, not real root, to a process? So that we ...
user avatar
2 votes
1 answer
2k views

Why doesn't setuid() work with non-root users?

I'm experiencing a weird behavior regarding setuid() and the setuid bit. It seems like the suid bit and setuid() do not work as expected. I am expecting for a binary with +s and owned by uid 1001 ...
user avatar
  • 131
1 vote
1 answer
442 views

How to implement setuid bit? [duplicate]

I created a small script as the root user... #!/bin/bash cat /etc/shadow and set the setuid bit and placed it within the guest folder. When I ran the script as guest, it showed permission denied. ...
user avatar
  • 301
4 votes
1 answer
8k views

realm join unable to create computer account

Reading man realm I see the following: --computer-ou=OU=xxx The distinguished name of an organizational unit to create the computer account. The exact format of the distinguished name depends on ...
user avatar
  • 868
0 votes
1 answer
359 views

Do world-writable systemd .service files created as symbolic links in /etc/systemd/system impose a security threat?

Do world-writable systemd .service files created as symbolic links in /etc/systemd/system impose a security threat? Would it be possible to somehow modify the links to target arbitrary .service files ...
user avatar
  • 3,357
1 vote
1 answer
350 views

Why does groupmems command ask for a password even when executed as root

The groupmems command that allows us to edit group membership has a peculiar trait: When executed as root, it again asks for root password when trying to edit any group membership for any system user. ...
user avatar
  • 1,905
0 votes
2 answers
1k views

Bash: Returns error without sudo

I'm running Kali Linux Live, and I was using the system as the root user for a long time before I came across an article online telling you NOT to use root as your default account, and that instead ...
user avatar

1
2 3 4 5