Questions tagged [privileges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
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
63 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
73 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
609 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 ...
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 (...
1
vote
1answer
789 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
452 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 ...
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 ...
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
301 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 ...
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 ...
2
votes
0answers
269 views

How Widely Used is Polkit? [closed]

I'm writing a program that requires root access. I'm hoping to use polkit for privilege escalation instead of just erroring out when the program is not run from root or via sudo. Is polkit used on ...
1
vote
1answer
754 views

Kernel and User space System Calls [closed]

I understand some complex internal of OSes, but I have a large gap in understanding kernel and user space. I will explain how I understand this now. First of all we have RAM for example 8GB, ...
1
vote
2answers
88 views

Reason for requirement for root for package management

In package managers like pacman and apt, the root check is hard coded into source using guid checks. Why is this? A non privileged user can compile a program - let's say chromium browser - from ...
4
votes
1answer
902 views

Executing commands in an elevated bash process by writing to the standard input of its parent script process

I have a simple bash script bash.sh that starts another bash instance using pkexec. #!/bin/bash bash -c 'pkexec bash' When executed this shows a prompt for the user to enter their password. The main ...
-1
votes
1answer
502 views

Have I missed anything? user1 is not in the sudoers file [duplicate]

I've created a user on a server where there was only root as: # adduser user1 with a password. Then # su - user1 And then: $ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - ...
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
2answers
128 views

Should I create should my own user with less privileges on a server (Digit. Ocean)?

I'm trying to deploy a website at Digital Ocean. I have the user root as the default. However, since it's root I believe I should create my own, normal user, shouldn't I? Nonetheless, in the ...
15
votes
2answers
7k views

Vulnerability demonstration on Ubuntu 9.04

For a class on IT security, I want to demonstrate privilege escalation to the students. To do so, I looked through the exploit/linux/local list in the Metasploit Framework, finding (among others) ...
4
votes
1answer
245 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 ...
2
votes
1answer
110 views

How do permissions work with the GUI

There are several things that you must have superuser privileges to do from a terminal that can be done from a normal user account via the gui. e.g. Poweroff/reboot mount/unmount media I understand ...
1
vote
1answer
3k views

Disable “shutdown” and “poweroff” command in Ubuntu

I want to disable "shutdown" and "poweroff" CLI commands in Ubuntu for a specific user. How to do it?
0
votes
1answer
408 views

Access from multiple users to same directory but can't change directory group to a common one

I need to give full access to user1 and user2 to this directory: drwxr-xr-- 3 oracle dba 4096 feb 9 23:16 scripts I can't change directoy group because probably that group is needed for other ...
1
vote
1answer
401 views

Allow file to be read by only system command in a C Program

I have a C program program.c that contains a system("/bin/cat file.txt") command, where file.txt is a file in the same directory as the C program. Now I would like to prevent users to read file.txt by ...
0
votes
3answers
99 views

What additional privileges does the root user have over a standard user? [closed]

What additional privileges does the root user have over a standard user in Linux?
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 ...
1
vote
2answers
62 views

how to give access to other user can access my account?

I have one server X, and having 2 user accounts A and B. How to give user access B to user account A.
5
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.
23
votes
8answers
4k 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 ...
3
votes
1answer
70 views

How many check points in RHEL/CentOS to make sure no one have sudo/root access

I want to make sure no one has sudo access or root access on some production servers. Some points I have also verified like: grep 'x:0:' /etc/passwd grep root /etc/group cat /etc/sudoers key in /root/...
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, ...
8
votes
6answers
1k views

Allow regular users to SSH using a private key they cannot read

Let's say I have a set of machines (called here the customers' machines) that only a small list of people (called the support staff) is allowed to SSH into, using only one account by machine (the ...
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 ...
2
votes
0answers
35 views

Sed is unable to copy temporary file to original file [duplicate]

My aim is to edit the file (whose owner is user1) using a script where user2 doesn't have permission to directly edit the file but it should be edited when executed through script by user2. So I set ...
18
votes
1answer
48k views

Allow certain guests to execute certain commands

I would like to create a new user on some of my Debian/Ubuntu hosts that is able to update the server using the commands apt-get update and apt-get dist-upgrade, but I do not wan't to give them full ...
-2
votes
1answer
67 views

Is this a violation? using https service in intranet?

I have CentOS 7 servers in the cloud which is offering HTTPS services. Now this Enterprise can't use our services from the cloud, so they wanted a local intranet solution, the same as I am running in ...
0
votes
1answer
97 views

How to configure a user in sudoers such that the user can install app and can't access a specified directory

I want to add a user to sudoers, such that the user can do anything in root permission but: The user can't use mount command; The user can't access(read or write) to directory /home/protecteddir; ...
2
votes
1answer
60 views

How to guard a set of folders from being written into by a specific process?

I would like to have a way in which a set of folders do not allow write access for a particular process. For example, I would love to have a way in which YUM/RPM is not allowed to write into /usr/bin
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
0answers
61 views

Allow move but not put in internal-sftp

is it possible with the internal-sftp to allow mv command from dir A to B but not allow put to A?
4
votes
2answers
3k views

How to update user/group settings of a running process?

Suppose I change some user settings like its initial login group or add it to a new group. I now can do su user and work with these new settings. But all the previously running processes will still ...
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 ...
0
votes
2answers
141 views

What are the exact powers of a superuser? [closed]

What are the exact powers for a super user? Would the have privileges to disable a standard users ls command? For example: If I ran the command: ls And the output I received was: This is a fake ls!...
3
votes
2answers
10k views

Allow another user to run a specific script as my ID

I have a script somewhere in my home directory. I need to give another user or a group permissions such that when they execute that specific script, it executes as though I am logged in and has all ...
0
votes
1answer
86 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 ...
0
votes
1answer
52 views

What are the differences between sudo and the use of groups?

I know these are tools used for improving security. But what I would like to know is what they are and how they work?