Questions tagged [privileges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
80 views

Run shellcode as root in a buffer overflow attack?

I'm trying to exploit the following code: #include <stdio.h> #include <string.h> int main(int argc, char** argv){ char buffer[100]; strcpy(buffer, argv[1]); return 0; } with ...
r3k0j's user avatar
  • 15
2 votes
1 answer
1k views

How does rfkill work without being root (or using sudo)?

I saw this statement at the end of this answer: PS: I have no idea why rfkill works when run as an unprivileged user. On my Mint, it doesn't have a setuid or setgid bit. I was curious, and looked on ...
cocomac's user avatar
  • 505
0 votes
1 answer
35 views

Some GTk3 applications aborting with BadAccess when DISPLAY=:0 but not DISPLAY=hnam.local:0 or even DISPLAY=unix:0

I've had some issues with my XQuartz environment not starting due to a bit of a freak reason that was a rather hard to figure out. It's (mostly) working again but I must have caused another regression ...
RJVB's user avatar
  • 254
7 votes
1 answer
744 views

Super-user privileges for Chromium browser

After apt-get install chromium and running it on Debian 12, ps alx | grep -e ^F -e ^5.*chromium returns: F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1000 ...
Juergen's user avatar
  • 674
0 votes
1 answer
62 views

Granting privileges using visudo still prevents user to execute command

Following this solution, I want to grant to the user daemon the execution of /bin/date. Here what I did: find the user that apache2 uses when spawning: # ps | grep httpd 252 root /usr/bin/httpd -...
Mark's user avatar
  • 723
0 votes
1 answer
65 views

Is it possible to grant a specific privilege to a user without sudo?

I'm not going to add sudo in my Buildroot environment for RPi 3 B+ since I just need apache2 to update my system time with date -s TIME. Is there a way to grant this permission without installing and ...
Mark's user avatar
  • 723
0 votes
2 answers
82 views

Run part of command line command with sudo

I execute this time sudo nice -n -20 bash myscript.sh myscript.sh then processes some files as well as create files with the result. Two problems with this: the script is run as root the resulting ...
d-b's user avatar
  • 1,891
0 votes
1 answer
103 views

How can I privilage a user to sign in on my ubuntu server via ssh when a system shutdown is scheduled?

I have scheduled a system reboot every night in my crontab with this line: 0 4 * * * /sbin/shutdown -r +5 I would like to be able to log in and cancel the reboot if I need the system to stay up at ...
Cedric Lindenau's user avatar
1 vote
0 answers
38 views

Implementation of groups in the linux kernel

Question: Are there any further sources to catch up on the implementation of groups in the linux kernel. The man page about credentials helped me out so far, but I like to delve deeper (though still ...
Semnodime's user avatar
  • 347
1 vote
0 answers
65 views

Trying to mount USB-drive automatically through udev; script complains that it's not superuser [duplicate]

I am trying to mount my USB-drive automatically on Linux.  I have this script: #!/usr/bin/bash mount /dev/safety1 /mnt/hd 2> /home/harald/errors/e rsync -az /mnt/hd/ /home/harald/backups/ &&...
Harald Verbraak's user avatar
1 vote
1 answer
498 views

Journalctl logs for a unit running under different user without sudo

Let's say I have two users. One is admin and has sudo privileges and one is a regular user. Regular user runs a process and admin want's to see the process logs without using sudo. How to achieve this?...
Curu's user avatar
  • 13
0 votes
1 answer
88 views

How do I have two group owners

I have a file where I want there to be not one but two groups who can have extra privileges to access it. But when I chown or chgrp it to a group it always erases the previous group. How do I add a ...
ConcernedParagraph7235's user avatar
2 votes
0 answers
345 views

How to grant nobody openvpn access to the ccd directory?

I need to distribute static addresses to some openvpn clients, which I decided to do via ccd. I would also like to downgrade the privileges of the openvpn daemon for more security. Unfortunately, ...
Alex A.'s user avatar
  • 183
0 votes
0 answers
136 views

Executing sudo commands without password, not using /etc/sudoers?

I've created an instance of Ubuntu 20.04 in Azure, and I've noticed that I can run sudo commands without typing a password. I assumed that this is done by using the NOPASSWD directive in the /etc/...
YoavKlein's user avatar
  • 332
1 vote
0 answers
1k views

Is there any way to start services from docker image, can't start pre-enabled systemd images (255)

I want to start some service from this section tryed everything up until now and run out of ideas. I have a debian 10 VPS with no root access and need i have been looking forward to find another way ...
UCA Firmware's user avatar
1 vote
1 answer
871 views

Is appropriate to use setuid() over setresuid()/setreuid()/seteuid()?

I have an executable binary which was compiled from a C source file The executable has the setuid permission on I noticed that, if the owner of the executable is root, I can use setuid(geteuid()); ...
rafagarci's user avatar
1 vote
1 answer
811 views

Find all binaries that require root privilege in a freshly installed Ubuntu 20.04 LTE

I am currently looking for the simplest way to find all binary files in /usr/bin and /usr/sbin directories that require root privilege to run, which means I should run them using sudo or by being root ...
Tomas 's user avatar
  • 141
0 votes
0 answers
310 views

debugger as a tool to get to root shell

according to the answer in the reference: Can gdb debug suid root programs? Claims that: "You can only debug a setuid or setgid program if the debugger is running as root. The kernel won't let ...
linuxbeginner's user avatar
-3 votes
1 answer
265 views

Why do package managers require root priveleges?

The default package manager for mainstream Linux distros (deb/apt, yum/dnf, pacman, etc) do global-installation by default and require root. It seems better to install as user or group and not need ...
charmoniumQ's user avatar
0 votes
0 answers
108 views

Give program/user rights for specific tasks

I'm writing a program that needs to perform some privileged operations without inserting any password, for example: use systemctl commands run superuser commands read/write files owned by root user ...
Mdp11's user avatar
  • 101
2 votes
1 answer
5k views

How to enable sudo privileges for user group to apt-get install anything

I want to give a group permission to install software without needing to input a root/sudo password. I'm on Linux Mint 20.3 Cinnamon. I have created a group called "basicsudo". I first typed ...
infinitezero's user avatar
-1 votes
1 answer
782 views

Using "doas" with root password instead of user password

From my limited understanding, the doas utility allows you to run any command as root but, by default, requires you to enter your own password instead of the root user's password. How do I make it ...
NickKeeger's user avatar
0 votes
2 answers
77 views

Restricting a GUI user to perform only predefined actions on Ubuntu

I am the admin of an Ubuntu machine, which I want to let a user "guest" login to via GUI. This user should be able to perform only certain actions (like view the contents of some files ...
bleepx's user avatar
  • 1
1 vote
1 answer
3k views

/etc/sudoers - clarification about "all" vs "all:all" for groups [duplicate]

About configuration(s) for the /etc/sudoers file with visudo I have read the following tutorials (among others): How To Edit the Sudoers File Linux visudo command A very important part is the ...
Manuel Jordan's user avatar
-1 votes
1 answer
844 views

Permission Denied on Yum Installation

i am trying to install yum on my Ubuntu Server 20.04, i am using an administrator user which has a root privileges (since i have added such administrator user to the root line in visudo). So i ...
Ahmad's user avatar
  • 99
1 vote
1 answer
1k views

In unix-like systems, is there an anonymous login and how to disable it?

I am a DevOps engineer working with AWS. My company is under a security audit and we got a report stating the following points: --- REPORT BEGIN --- Observation: In some EC2 instances, anonymous ...
Hugo Ochoa's user avatar
1 vote
1 answer
267 views

Privilege drop: Allow readonly access to file for unprivileged process on a readonly file system

An ideally least privileged process should be able to have readonly access to data on a filesystem, which itself is readonly. Hence this is the situation root@linux# ###(1) filesystem is untrusted + ...
humanityANDpeace's user avatar
3 votes
2 answers
2k views

Why would having a user without a password be a bad idea (in this scenario)?

I thought about whether to post this here or in security SE... but decided to go with Unix SE since this isn't really a question about cryptography stuff but more about Linux users / privileges. Maybe ...
zpangwin's user avatar
  • 801
1 vote
1 answer
2k views

Attempting to get root UID from root EUID

So here is the situation. I have a hypothetical system with 2 users - 'user1' and 'root'. The user 'user1' is just a normal non-sudoer user with uid=1000, and the root, is just a normal root user with ...
Bl4ckC4t's user avatar
0 votes
1 answer
13k 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 ...
Lee's user avatar
  • 497
4 votes
3 answers
1k 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, ...
stevenman's user avatar
25 votes
1 answer
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 ...
Amir reza Riahi's user avatar
2 votes
1 answer
184 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 ...
wxi's user avatar
  • 149
4 votes
2 answers
8k 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 ...
Elle Fie's user avatar
  • 193
6 votes
1 answer
4k 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 /...
Paul's user avatar
  • 507
0 votes
1 answer
2k 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 ...
flyingpluto7's user avatar
2 votes
3 answers
2k 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 ...
Tim's user avatar
  • 102k
0 votes
1 answer
3k 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 ...
N0striv's user avatar
1 vote
0 answers
36 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 ...
Vorac's user avatar
  • 3,077
0 votes
2 answers
124 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 ...
dragonmnl's user avatar
  • 2,249
0 votes
1 answer
43 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) ...
kendzi's user avatar
  • 3
0 votes
0 answers
44 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.
kdm.J's user avatar
  • 11
1 vote
0 answers
538 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 ...
tcelvis's user avatar
  • 11
2 votes
2 answers
915 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 ...
maddy's user avatar
  • 21
0 votes
1 answer
266 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 ...
Parsa Mousavi's user avatar
0 votes
0 answers
362 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, ...
kmotoko's user avatar
  • 451
0 votes
1 answer
828 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 ...
Wimateeka's user avatar
  • 1,005
2 votes
1 answer
841 views

Edit ssh_config without ssh connection on a remote VPS

Yesterday, I was busy setting up a remote server and securing it. I am a noob at code, programming and webhosting, but I am trying to host my own website. So yesterday I changed some settings in the ...
Stoma Slobberaar's user avatar
2 votes
1 answer
1k 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 ...
BlackCrystal's user avatar
0 votes
0 answers
91 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 ...
Marco's user avatar
  • 1

1
2 3 4 5