Questions tagged [privileges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
120
votes
8answers
28k views

Which is the safest way to get root privileges: sudo, su or login?

I would like to have the root account in safety even if my unprivileged user is compromised. On Ubuntu you can only use sudo for "security reasons" by default. However I am not sure it is any safer ...
3
votes
1answer
438 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
425 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 ...
2
votes
3answers
22k views

Vim Error 'E212: Cannot open file for writing', when trying to create new files outside of home dir

I am running Wheezy Debian. When I try to create a new file in a directory other than my home directory, such as /var/www, I get the following error in vim: E212: Cannot open file for writing. I ...
6
votes
3answers
2k views

How can I set up Apache to use port 1 and other ports below 80?

The mysql user cannot use ports below 1024 because these are reserved for the root user. Apache, on the other hand, can use port 80. Apache runs as root before it runs as Apache and thus it can use ...
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
2answers
109 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
179 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 ...
4
votes
2answers
6k views

How to grant a “no-root-user” rights to start/stop/restart mysql server on suse machine?

Is it possible to grant priviliges to a "no-root-user" to start and/stop/restart the mysql server on a suse machine? The goal is to make it for a developer possible to tune a mysql server/database ...
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
347 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
190 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
253 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
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 ...
4
votes
1answer
6k views

Show who a file is chowned to?

I can chown a file with chown myuser:mygroup /tmp/file, but how can I see who a file is already chowned to, or who already owns it? Something like chown --show-who maybe... How can I list the user ...
1
vote
1answer
545 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
3answers
9k views

Privileges for jenkins at apache's folder

I'm having issue similar to this: How to copy files as Jenkins "post build" action if i don't have privileges to destination directory I'm willing to move/copy/rsync files from jenkins ...
5
votes
3answers
4k views

Which Linux capability do I need in order to write to /proc/sys/vm/drop_caches?

I am trying to clear my filesystem cache from inside a docker container, like so: docker run --rm ubuntu:vivid sh -c "/bin/echo 3 > /proc/sys/vm/drop_caches" If I run this command I get sh: 1: ...
1
vote
1answer
91 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 ...
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
492 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 ...
0
votes
1answer
321 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 ...
4
votes
1answer
247 views

Launch a sudoed command upon script termination?

I'm coding a bash script that: runs some sudoed command at initialization releases root permissions for security purposes (sudo -K) runs an unprivilegied program but needs root permissions when ...
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 ...
0
votes
3answers
4k views

How to gain root privileges for specific user if we have root password? [closed]

Can someone suggest how can I change process privileges in Linux to root ? Assume, I have a normal process running under some user-consider me. Now my script should create some users using 'useradd' ...
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 ...
23
votes
8answers
5k views

Which access rights can't the superuser violate?

Fr. Br. George told in one of his lectures (it's in Russian) that there are some access rights that superuser can not violate. That is there are some access right which can forbid superuser doing ...
6
votes
3answers
16k views

sudoer file how to give a particular user full access to only certain file

I want to give a user full access to only certain files, can someone show me how to do that? For example, I want to modify the sudoer file to grant user access to only certain file. Thanks.
1
vote
2answers
609 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
38 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 ...
1
vote
1answer
366 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 ...
74
votes
3answers
12k views

How do the internals of sudo work?

How does sudo work internally? How is it possible that it can become root without having the root password, unlike su? What syscalls, etc. are involved in the process? Is it not a gaping security hole ...
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
142 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 ...
0
votes
1answer
66 views

Best way to give a user some root privileges in particular apach files and command

I wrote a shell script (this one) to init a new website project. It have to be executed by a user (it isn’t a mater if he got root privileges because this user is me). As you see, the user have to be ...
-1
votes
2answers
74 views

Do I have to type su everytime? [closed]

I have created a user. useradd -M -d /usr/my_user my_user chown -R my_user. /usr/my_user Now as a root I can type su - my_user -c /usr/my_user/some_dir/script.sh But if I want to do more ...
1
vote
2answers
633 views

What user does a Linux script/app run as?

CentOS here, but I don't think that matters because this should be a core Linux question (methinks). While trying to install & run Apache Kafka (a Java executable) on a CentOS box, I thought of a ...
1
vote
2answers
8k views

How to determine the permissions of groups?

When you invoke sudo, it prompts for password and then checks the /etc/sudoers configuration file to see if the user is permitted access to run the command. /etc/sudoers is the sudo configuration file ...
1
vote
1answer
801 views

Find out what capabilities a process needs

I want to allow run zfs zpool commands without root and sudo. I suppose that I need to give some capabilities to user, but how to get list of capabilities needed by some particular command? The OS is ...
1
vote
2answers
465 views

Allow user to use brclt-like commands without sudo

I have script that using python library(pyroute2) to create and manage bridge. But I don't want to run this script as root and want to allow some specific user to have required privileges. Is it ...
0
votes
1answer
89 views

Linux driver privileges

I've loaded a custom driver to linux via mknod. However, now any programs I write to use it need to be run using sudo, which is difficult to do when I'm using an IDE. Is there any way to adjust the ...
16
votes
3answers
7k views

What are benefits and downsides of unprivileged containers?

The technical explanation of what is unprivileged container is quite good. However, it is not for ordinary PC user. Is there a simple answer when and why people should use unpriviliged containers, and ...
2
votes
2answers
1k views

Grant privileges on MariaDB? [closed]

I'm following some tutorial to install Zabbix on my CentOS 7.2 Here's the command line used to create zabbix database and give privileges Type 'help;' or '\h' for help. Type '\c' to clear the current ...
1
vote
1answer
26 views

How can I reset user home folder privileges from gui

I saved my home folder when I moved from 32bit Mint to 64bit Mint. Next, I installed Mint 18 from scratch, and copied home folder from backup as root user. Now I can't get home to startup as it ...
2
votes
1answer
304 views

“/usr/lib/passmgmt: Password file(s) busy. Try again later” in Solaris 11

I've been playing around with a Solaris 11 system, where I've made several user-accounts for myself. Anyway, I gave one of my unprivileged account the solaris.* auth, and then tried to give another ...
1
vote
0answers
27 views

Must auths for privilege and such still be explicitly listed, or are they now included in solaris.*?

In OpenSolaris and the Solaris-version around that time, the solaris.grant auth wasn't included in solaris.* and had to be explicitly added. For example, from the definition of the Primary ...
35
votes
6answers
3k views

What is the safest way for programmatically writing to a file with root privileges?

A huge application needs, at one specific time, to perform a small number of writes to a file which requires root permissions. It is not really a file but a hardware interface which is exposed to ...
0
votes
1answer
55 views

How to give a particular use's privileges to another user in Debian?

Lets say in my Debian PC have 2 users called cat and dog. I want to use sudo setup to give dog's privileges to cat. So cat can do what dogs do. I'm new to sudo stuff but I tried below config. It ...