Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [privileges]

The tag has no usage guidance.

8
votes
2answers
661 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
35 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
155 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
32 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
9 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
524 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
96 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 ...
1
vote
0answers
92 views

Higher privilege level than root on macOS [closed]

MY version of the macOS is 10.13.6 What I want to do is get a privilege that is higher than the root privilege. The reason I want this is because I would like to create a completely undeletable file/...
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
22 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
219 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
218 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
670 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
328 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
667 views

From which version does Bash drop privileges?

I've been trying to do some bufferoverflow attack, and I tought 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
255 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 ...
22
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
388 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
384 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
108 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
166 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
306 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
181 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
66 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
223 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
26 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
28 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
516 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
85 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 ...
4
votes
3answers
7k 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
1k 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
455 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
47 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
300 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
27 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
52 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
15k 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
565 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 ...
0
votes
1answer
37 views

Software available only to root user?

I am trying to install HP Fortify on RHEL 6.4. I installed it as the root user and can see on the PATH but when I login with a different user I can't see the software in the path. I have updated the ...
6
votes
3answers
422 views

Is it my job as a Linux admin to drop root privileges of applications, or the application developers job? [closed]

As a Linux admin, is one of my jobs to carry out some sort of task to drop root privileges of the applications running on my systems? Or do I simply rely upon the application developers to ensure ...
1
vote
1answer
355 views

Is it possible to run a program in early user space with non-root privileges?

I'm running a program from the init script in early user space, before the main root fs is mounted. Is it possible to run an application here without root privileges? The obvious issue being that ...
2
votes
1answer
26 views

How to create foolproof user that is only allowed to video chat with one person

I have to give a laptop to my 4 yr old who lives very far away from me, so that we can have regular video chats. I want to restrict any other use for that laptop, including video chats with other ...
2
votes
1answer
2k views

How can I execute notify-send from root? [duplicate]

I'm working on a bash script which requires root privileges, but which I'd like to give the ability to notify a non-root user of certain alerts via notify-send in GNOME (or any other desktop shell ...
2
votes
1answer
139 views

Shell script works different in KDE vs Terminal

I have a shell script that I created to change the next EFI boot then execute a reboot. If I execute it in a terminal window it works fine, but if I execute it using an Icon in KDE it reboots, but ...