Questions tagged [privileges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
10
votes
3answers
60k views

How to give user root permissions?

I just installed Arch. Works great. I created a new user, logged in with it and now I'm trying to install several thing with pacman. But I keep getting the error: error: you cannot perform this ...
0
votes
0answers
14 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. ...
1
vote
0answers
32 views

Debian 9: Users and Groups

I'm trying to run users-admin from Debian 9 LXDE but I'm having the following issues: 1. Logged as root root@debian:~# users-admin Gtk-Message: GtkDialog mapped without a transient parent. This is ...
0
votes
2answers
41 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
12 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 ...
4
votes
1answer
1k views

Run command with sudo by default

I need a linux user (lets call him "bob") who is allowed to run a list of commands which require root privileges. So let him be required to run /sbin/firstcommand and /sbin/secondcommand (which are ...
61
votes
6answers
109k views

Allowing a user to let listen to a port below 1024

I need to allow a user (different from root) to run a server listening on port 80. Is there any way to do this?
22
votes
3answers
4k views

What script could allow regular users to use network namespaces?

I have an architecture using network namespaces (netns). I would like to allow regular users to do some operations in these netns. I could write a script netns-exec.sh, inspired by this post, ...
7
votes
6answers
1k views

Detecting cron tasks run by another user

I am currently working through the Nebula challenges on exploit-exercises.com, and one of the challenges relies on a script being run by cron. This is run by another user (flag03) and the user I am ...
10
votes
7answers
92k views

How to run google chrome as root in linux

when I want to run google chrome as root, an error message with this title appears: Google chrome can not be run as root and the body of message is: to run as root, you must specify an ...
6
votes
3answers
2k views

How can a file manager mount a drive without root?

I've been reading this question about why mount must be run as root (with some exceptions), and I was wondering, if mounting a drive requires root (generally), how does a graphical file manager (...
8
votes
2answers
715 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 ...
23
votes
2answers
50k views

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system

What exactly is happening here? root@bob-p7-1298c:/# ls -l /tmp/report.csv && lsof | grep "report.csv" -rw-r--r-- 1 mysql mysql 1430 Dec 4 12:34 /tmp/report.csv lsof: WARNING: can't stat() ...
1
vote
1answer
160 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 ...
1
vote
1answer
68 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 ...
3
votes
2answers
3k views

Why sudo user can use sched_setscheduler SCHED_RR while root can not?

I am running Arch Linux on a Raspberry Pi 2. I have a user-space program that uses Gordon's wiringPi library and, in particular, the piHiPri() function that attempts to set the highest priority for ...
1
vote
1answer
1k views

Which tasks/commands can't be executed with user gid=0 but uid≠0 on Linux [duplicate]

In a Linux server I will have an user with gid=0 but it's uid won't be 0. As there are many commands with root:root and execute permissions for group I know there will be a lot of administrative task ...
2
votes
1answer
16k 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
votes
1answer
275 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 ...
0
votes
1answer
44 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
14 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
700 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 ...
5
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 ...
1
vote
1answer
105 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
101 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 ...
9
votes
2answers
8k views

Bash cannot act as nobody and nogroup?

I have a log file that was created by nobody:nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file. My first thought was to: $ sudo su nobody This account ...
12
votes
5answers
12k views

How do I drop root privileges in shell scripts?

The "--up" option in OpenVPN is normally used for routing etc. And so it is processed before OpenVPN drops root privileges to run as nobody. However, I am invoking shell scripts that need to run as an ...
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
3answers
5k views

X: user not authorized to run the X server, aborting [closed]

After I login to a server using ssh and try to initiate X11 I got the below error message: $startx X: user not authorized to run the X server, aborting. xinit: giving up xinit: server error by ...
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/...
22
votes
3answers
29k views

GID, current, primary, supplementary, effective and real group IDs?

The following links discuss these concepts in different contexts. I have read their definitions, but I still can't tell how they are related, or if some of them are just the same. Current group ID ...
1
vote
2answers
873 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 ...
3
votes
3answers
96 views

possibility of running daemons with under privileged users during bootup

I have an authoritative DNS daemon in my test DNS setup which is responsible to provide host IP at best choice. This daemon/process can run by setting some capabilities using setcap and then a ...
11
votes
4answers
2k views

Does managing cgroups require root access?

I am trying to work with control groups on two different operating systems (Ubuntu and CentOS). There are few concerns that I would like to ask. I am trying to create a control group using the ...
0
votes
5answers
255 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. ...
20
votes
4answers
31k views

why does sudo work on Linux but not Android?

I have not had the chance to read enough about Android, Linux, or UNIX to answer this myself. sudo works on a Linux machine but doesn't work on Android unless you root the mobile device (e.g. Samsung ...
11
votes
5answers
9k views

Drop Process Privileges

I have a process that gets started by a damon running as root, now I want to "downgrade" this process's privileges to those of your average user. Is this possible? If yes how? PS: Running unix on a ...
2
votes
1answer
248 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, ...
5
votes
1answer
815 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() ...
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
351 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 ...
7
votes
3answers
2k views

Is it possible to run 'unshare -n [program]' as an unprivileged user?

I want to run a program without any internet access, e.g. unshare -n ping 127.0.0.1. As an unprivileged user, it returns Operation not permitted, as a privileged user, it returns the desired ...
10
votes
2answers
7k views

Why can an unprivileged user execute the `sync` command?

Currently on Ubuntu Linux, but I noticed this on other OSs too. Apparently any user can execute the sync command – but why is this? I can only see the disadvantage: system slow down due to unnecessary ...
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’...
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 ...
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....