Questions tagged [privileges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
77 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 ...
4
votes
3answers
350 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, ...
25
votes
1answer
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 ...
1
vote
1answer
38 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 ...
3
votes
2answers
528 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 ...
3
votes
1answer
222 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 /...
0
votes
1answer
62 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 ...
1
vote
3answers
151 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 ...
0
votes
1answer
102 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 ...
1
vote
0answers
35 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 ...
0
votes
2answers
42 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 ...
0
votes
1answer
22 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) ...
0
votes
0answers
41 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.
1
vote
0answers
104 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 ...
2
votes
2answers
141 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 ...
0
votes
1answer
16 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 ...
0
votes
0answers
36 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, ...
0
votes
1answer
46 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 ...
2
votes
0answers
105 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 ...
0
votes
0answers
32 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 ...
0
votes
1answer
398 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 ...
1
vote
1answer
2k 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 ...
1
vote
1answer
34 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 ...
0
votes
2answers
28 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 ...
4
votes
0answers
87 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 ...
2
votes
1answer
981 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 ...
1
vote
1answer
173 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. ...
2
votes
1answer
5k 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 ...
0
votes
1answer
182 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 ...
1
vote
1answer
179 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. ...
0
votes
2answers
725 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 ...
1
vote
0answers
147 views

backup privileged data on remote servers without root ssh

I'm sufficiently new to Linux that I don't understand how to do what I think I want. If you think you know what I actually want, please tell me. I would like to use Duplicity to backup privileged ...
9
votes
2answers
1k views

Why does the setuid bit work inconsistently?

I wrote the code: // a.c #include <stdlib.h> int main () { system("/bin/sh"); return 0; } compiled with command: gcc a.c -o a.out added setuid bit on it: sudo chown root.root a.out sudo ...
0
votes
1answer
48 views

how to run a bash that must be run with a specific user with another user without password

I have 2 users. test1 that i created it with /sbin/nologin and has no password. test2 that has sudo privilege and has passworsd. I have this script: /data/tempWork/fazitst that must be run under ...
1
vote
1answer
266 views

Alternatives to suid, for script and interpreted languages

On Unixes (including Gnu/Linux) suid/sgid (or file capabilities) is the only, native (all other ways use this way), way to escalate privileges. As a sysadmin, I like to write scripts as they are ...
0
votes
1answer
181 views

Manage root privileges for users on Red Hat Azure VM

We have set up a Red Hat VM on Azure, but we are unsure how we could deal with user privileges. We want to use the VM to test software in a Linux environment as opposed to the Windows workstations ...
0
votes
1answer
2k views

Privilege escalation with sudo vim

I have the following problem: I configured sudo with permissions for everything except for a few commands, remove, reboot, shutdown, block from sudo to shell, preventing a user from elevating the ...
1
vote
1answer
284 views

ssh ethernet tunneling as normal user

I would like to connect 2 tap-devices. The tap-device on the remote server is owned by "user". This is my test-command: # ssh -oTunnel=ethernet -w0:0 user@server But it does not work, I get this ...
2
votes
2answers
63 views

Is it possible for a process currently installed on a system to escalate its privileges by knowing root's password?

Let's suppose a scenario of a Unix-like system (like macOs, linux, solaris etc.) having installed a program from the internet that's been developed by a malicious actor. The program does not use any ...
0
votes
0answers
63 views

How can I be able to `mv` a directory owned by root? [duplicate]

System: Linux Mint 19. Situation: I do not understand the following. How can I be able to mv a directory owned by root? Some information, that might be useful: Actual working directory: $ pwd /...
1
vote
1answer
68 views

Can a linux user access to a file in this case?

This is a theoretical question. I'm using a linux system with two users: root and nonRoot. I'm debugging an application as nonRoot, that uses a file placed in the following path: /home/nonRootFolder/...
-1
votes
5answers
679 views

Is a process with effective or real uid being root still subject to permission bits of a file when accessing the file?

From Didi Kohen's answer to Do sudo and su belong to capability-based security? In Unix and Linux there are two levels of permissions: standard user and superuser (usually called root). The standard ...
0
votes
0answers
173 views

Always run script as root [duplicate]

I want to run a command automatically. The problem is that it may only be run after I logged in and that it requires superuser privileges. I've heard of suid before, so I thought I'd use it for this. ...
2
votes
1answer
450 views

Whitespaces in /etc/exports

I've read the following in a website [1]: /etc/exports is very sensitive to whitespace - so the following statements are not the same: /export/dir hostname(rw,no_root_squash) /export/dir hostname (...
2
votes
1answer
2k views

Username is not in the sudoers file. This incident will be reported - WHERE/HOW? [duplicate]

When a user not in sudoers tries to elevate privileges to root (in Ubuntu 18.04 for example) the OS displays this alert: "Username is not in the sudoers file. This incident will be reported". Now, ...
2
votes
2answers
3k views

Giving users scheduling privileges

I have some code which uses sched_setscheduler from sched.h sched_param sched; sched.sched_priority = 70; sched_setscheduler(getpid(), SCHED_FIFO, &sched); However, this function will fail ...
15
votes
3answers
2k views

make all the processes of a given user killable by anyone

On a shared server, I would like to have some very low priority users such that whenever an other user (also without root privileges) needs the resources, they can kill any of the low priority users' ...
4
votes
1answer
723 views

Where are UID/GID of a process from, when not from the process's cred pointer?

Circumstances I'm having a lecture on "Cloud Security" at University, and am currently doing a project on virtual machine introspection. Goal of my exercise was to escalate privileges of some ...
5
votes
1answer
2k views

From which version does Bash drop privileges?

I've been trying to do some buffer overflow attack, and I thought I could use system("/bin/bash") in order to obtain a root shell. Then I read the documentation for system(). It says: system() ...
1
vote
2answers
58 views

Privacy as regular user against root?

I need to run a script as a regular user on a remote machine whose root I do not trust. This script outputs very sensitive data to stdout. What steps can I take to ensure only I can read the script’...

1
2 3 4 5