The tag has no usage guidance.

learn more… | top users | synonyms

4
votes
1answer
80 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 ...
-1
votes
1answer
18 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 - ...
32
votes
6answers
2k 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
41 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 ...
16
votes
2answers
2k 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
120 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
34 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 ...
1
vote
1answer
122 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
63 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
55 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
0answers
6 views

Why INetSim cannot bind to port 80 and port 25 [duplicate]

I am running INetSim on a Debian 8 32-bit VM. INetSim needs to be executed under root, and I do so. I know that only root can bind to ports lower than 1024, so it should not be a problem of privileges ...
0
votes
3answers
50 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?
2
votes
1answer
69 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
44 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.
0
votes
0answers
43 views

Linux - What resources require raised privileges C/C++ programming?

I am in the process of developing a daemon and user application which will talk to the daemon over a UNIX domain socket to send commands, get status information, etc. The user application will be run ...
3
votes
3answers
711 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.
19
votes
7answers
3k 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
61 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 ...
5
votes
0answers
205 views

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, ...
6
votes
6answers
372 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 ...
0
votes
0answers
283 views

Getting administrator privileges on Aptio Setup Utility

I am about to install Lubuntu on an Asus s56c machine currently running Windows 8.1. I need to change the boot order and remove the secure boot on my pc but I can't get into the BIOS Aptio Setup ...
2
votes
2answers
319 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
31 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 ...
3
votes
1answer
1k 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
48 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
29 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
35 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 ...
3
votes
2answers
454 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
24 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?
3
votes
2answers
186 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 ...
2
votes
1answer
467 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
73 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 ...
2
votes
2answers
679 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
46 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?
7
votes
2answers
156 views

Does managing cgroups require root access?

I am trying to work with control groups on two different operating systems (Ubuntu and CentoOS). There are few concerns that I would like to ask. I am trying to create a control group using the ...
2
votes
1answer
243 views

Who can change ACL permissions?

I'm using ACL to control access to individual roots of webs for different instances of Apache and different groups of admins. I've got a Unix group admins-web22 for admins of a particular website and ...
1
vote
1answer
191 views

How to run smartctl as root without switching to root?

I have this C code that runs smartctl command and takes its output: #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main() { cout << ...
5
votes
2answers
233 views

How do daemons like apache or bind open ports below 1024?

I know that ports below 1024 are protected and can't be opened by a user without sufficient permission. However, I'm wondering how daemons such as bind or apache can do so, though they aren't running ...
2
votes
2answers
134 views

How do I allow privileged commands to fail but respond?

I am reading up on several commands, some of which are privileged and some that may or may not be installed. My system (gentoo) will respond with command not found sometimes when the program in the ...
1
vote
2answers
87 views

Privilege for a linux application

If I write a program on Linux, I have two ways of configuring what privilege the program runs with: It can run with the invoker's privilege (whoever runs the program) I can use setuid so it can run ...
13
votes
3answers
2k 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 ...
1
vote
2answers
157 views

Bash launch certain commands like being a root user without being root user

I've the following problem. When I launch df command being a usual user of machine it outputs what I need: But when I try to launch it from another user (www-data in this case) I have problems ...
3
votes
1answer
81 views

USB-Insert Authentication for Linux

On Windows, when I insert a USB, I use USB Security. So I'd get "To allow USB access, enter a password." So I'd have to enter a password to be able to even view USB contents or run it. Is there such ...
2
votes
2answers
256 views

How can I configure Linux to not require sudo for specific commands for specific users?

I am sure this question has been asked before but I can't find an answer. I would like to configure Linux so that when I enter specific commands (e.g. apt-get), I wouldn't have to enter password as I ...
2
votes
2answers
10k 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 ...
1
vote
2answers
83 views

Give group the right to send kill signals

I have a process that a user1 runs. And I need to grant all the group members the right to send some kill signal to it. So far, I always get this output: myProcess(13919): Operation not permitted ...
3
votes
2answers
8k 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() ...
2
votes
3answers
2k views

How does mmap'ing /dev/mem work despite being from unprivileged mode?

As far as my understanding goes, User space programs run in the unprivileged mode, and thus do not have direct access to memory or I/O. Then how exactly can we directly access memory or I/O locations ...
5
votes
3answers
719 views

Shell/Bash script: Properly drop privileges

Okay, first of all, I know this question has been asked a few times here, but the answers given did not entirely satisfy me. The situation is the following: I have written many scripts to automate ...
1
vote
1answer
154 views

Open a new bash with sudo powers without reentering the password [duplicate]

I find very useful to have more terminal tabs in different current working directories. But if I need sudo privileges I need to reenter the password for every shell. Is there not a way to extend the ...