Questions tagged [privileges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 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 ...
0
votes
0answers
39 views

How to revoke sudo rights by adding some line to /etc/sudoers? [duplicate]

When we add at the end of /etc/sudoers the following line: username ALL=(ALL:ALL) ALL then user username can use sudo by providing their password. Is it possible to add a line to this file to ...
2
votes
0answers
47 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
24 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
117 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
229 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
32 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
27 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
73 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
259 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
71 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. ...
1
vote
1answer
2k 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
75 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 ...
0
votes
0answers
57 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
155 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
40 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 ...
8
votes
2answers
943 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
42 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
190 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
111 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
1k 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
169 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
59 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
29 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
66 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/...
0
votes
5answers
426 views

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

From https://security.stackexchange.com/a/67218/ In Unix and Linux there are two levels of permissions: standard user and superuser (usually called root). The standard user has access only to ...
0
votes
0answers
74 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
342 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 ...
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, ...
1
vote
2answers
2k 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
500 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
1k 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
53 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
votes
1answer
369 views

Cant Delete folders Permission Denied

I have freshly installed Ubuntu 16.04.3 LTS I installed Anaconda from the shell file provided by the official links I also installed vscode from the shell file (.sh) only provided by anaconda my ...
24
votes
3answers
5k 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 ...
4
votes
1answer
766 views

How to understand Bash privileged mode?

I've read the section in man bash explaining the set builtin's -p flag, and this tells me a few of the effects that privileged mode has on Bash's behavior, but it doesn't explain in enough depth (or I ...
1
vote
1answer
598 views

Get Current Privilege Level for a process (ring)

I'm doing a research about virtual machines and the rings they are running in. From documentation, this is sometimes hard to find. So I would like to run the VM's and then have a look at the processes ...
1
vote
2answers
124 views

Why do I need root-privileges to update my package manager's package list?

Why do I need root-privileges to update my package managers package list? Hi, I always wondered why I need root-privileges to update my package managers package list? I'm aware that the privileges ...
4
votes
1answer
295 views

Give a user privileges to switch process UID, GID

I'm writing an application that create worker processes run under other users credential. This program works under root. However, I want to run it under a less privileged account. Is there any way I ...
2
votes
2answers
2k views

Mount as root for non-root user

How do I mount a nfs or any other share which requires usage of -o in the mount command so that the mount can be accessed by non-root user. If mount is user with -o option, it complains that only root ...
1
vote
1answer
520 views

How to find what ring a process is running on in Linux?

How can I find out which protection ring a given process is running in, and if possible can I produce a list of running processes with their respective rings? This thread gives some insight into what ...
0
votes
1answer
219 views

OpenBSD - isolation on Desktop application level

Which usable method is preferred as application isolation on OpenBSD? Running GUI apps with different users? Different for the webbrowser, torrent client, PDF viewer, etc. chroot? - https://www.ibm....
1
vote
1answer
74 views

How to know if a mysql user has all (or some) privileges on a certain DB?

How to know if a mysql user has all (or some) privileges on a certain DB? Of course, I don't ask how to do so with phpmyadmin, rather, with the mysql CLI. I aim to gather as much as basic data on a ...
1
vote
1answer
332 views

Red Hat disk utility only works for root, no sudoer?

I need to format a hard drive in Red Hat 6.4. When I use the graphical "Disk Utility" provided by Red Hat, it asks to authenticate using the root password. On this machine I am a sudoer and do not ...
0
votes
1answer
31 views

Set up additional swap space as non-privileged user

I want to run a program that requires more memory than what is available on the target machine. Unfortunately, I do not have root access to the machine where the program runs, so I cannot set up a ...
1
vote
1answer
32 views

How to apply usergroup changes without having to end session / logging out / closing programs?

I'd like to remove myself from usergroups via deluser username group-to-get-removed-from without having to log out and back in as most programs get closed when doing so. Is there a way to apply ...
1
vote
1answer
681 views

How does command “pmount” work without “sudo”

When I was studying the manual page for command pmount I read the following: pmount ("policy mount") is a wrapper around the standard mount program which permits normal users to mount ...
1
vote
1answer
195 views

Restrict applications from accessing certain resources

Mobile operating systems like Android or iOS define sets of permissions (e.g. read contacts/send sms/access camera, ...) a user needs to specifically grant to an application in order for the latter to ...
6
votes
3answers
11k views

cant add user to sudo group in centOS 7 i386(no GUI,Its minimal)

I had install centOS 7 minimal version in my virtualbox in Ubuntu mate. It has no GUI. It is totally CLI. My user name is Smit and able to login in to it. But when i type command sudo yum update and ...