Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [privileges]

The tag has no usage guidance.

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

Can't run supervisor as non root user

I have to run supervisord as non root user. I was trying set user in supervisord section in supervisord.conf but it was impossible to restart supervisor, because the status of service was "activating" ...
1
vote
1answer
45 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
338 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
43 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
22 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
49 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 ...
0
votes
0answers
25 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
793 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
39 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
163 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
67 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
0answers
16 views

vsftp on linux ec2

I have installed vsftp on Linux on an EC2 instance. I need to revoke the list privilege from one of the users. How can it be done? What I need is for the user to be able to upload files but not ...
0
votes
1answer
845 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
112 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
58 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
25 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
65 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
289 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
33 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
277 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
1k 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
1k 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
395 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
50 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
294 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 ...
23
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 ...
3
votes
1answer
561 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
464 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
113 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
203 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
1k 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
399 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
199 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
69 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
280 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
29 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
30 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
578 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
124 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 ...
5
votes
3answers
8k 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 ...
3
votes
2answers
2k views

setuid root does not work

Objective : Run a program as root (C++ binary). The same as : SetUID bit not working in Ubuntu? And : Why setuid does not work on executable? ./a.out output: E: Could not open lock file /var/lib/...
1
vote
1answer
521 views

Start python http server which can be stopped by anyone else

I would like to start a python SimpleHTTPServer instance but I would like to give the ability to everyone to stop it (execute kill -1). It wouldn't be a big deal to solve but I don't have the access ...
4
votes
1answer
48 views

How can I run a program with limited permissions

I noticed that a lot of my programs run under the same user like (firefox,chromium,steam,etc...) and therefore should have the same permissions as this user, but I would prefer to limit their accesses....
0
votes
1answer
333 views

How to defend from privilege escalation if user is using the disk group?

A base Centos7 install: [root@teszt ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 100G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 ...
1
vote
0answers
29 views

Debian not saving user's preferences of any program

Since I did a fresh installation of Debian, my computer is not saving user's preferences. The preferences only are saved for the session, but if I close the program and reopen it, it ask me again the ...
1
vote
1answer
53 views

Authenticate with username and password to get higher privileges

Is there any way to augment privileges for your process? Here's an example: Pretend program A was compiled in C with only user-mode privileges. Now let's just say this program wanted to get root ...
2
votes
1answer
18k views

useradd on CentOS with home directory and sudo privileges

There are so many variants to adduser or useradd -- which is correct? On CentOS release 5.11 (Final) I'm using adduser --create-home baz but somewhat prefer the way Ubuntu asks extraneous questions ...
1
vote
2answers
691 views

Make directory unmodifiable or undeletable except by root

I would like to prevent a directory from being deleted, let's assume the directory has this path ~/foo is there a way to make it deletable only by the root user, without using sudo and without being ...