The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
15 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
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
1answer
25 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
34 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 ...
13
votes
4answers
13k 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 ...
1
vote
1answer
28 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
40 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 ...
2
votes
3answers
136 views

Why does FreeBSD require terminal programs to be started as root?

On FreeBSD all graphical terminal programs (e.g. xterm, rxvt) seem to be installed setuid root, or with setuid root wrappers. On Linux, this is not the case on any distribution I have ever used. Why ...
4
votes
1answer
145 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 ...
6
votes
3answers
1k 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 ...
-1
votes
1answer
26 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 - ...
7
votes
2answers
199 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 ...
0
votes
2answers
42 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
2answers
14k views

What does the 's' attribute in file permissions mean? [duplicate]

Please compare the following two lines: -rws---r-x 1 root root 21872 2009-10-13 21:06 prg1 -rwx---r-x 1 root root 21872 2009-10-13 21:06 prg2 Does the setuid bit on prg1, along with the read and ...
4
votes
1answer
125 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
38 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 ...
2
votes
3answers
3k 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 ...
1
vote
1answer
210 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
79 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 ...
2
votes
1answer
84 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
1answer
62 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 ...
3
votes
2answers
3k views

Allow all group members to create directories and files

There are 2 users sftp_user apache Both users belong to the updaters group as well as other groups. New directories and files are created in the /updates/ directory. drwxrwsr-x 8 sftp ...
2
votes
2answers
579 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 ...
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
51 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?
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
46 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 ...
2
votes
3answers
3k views

Is it possible to kill another user's program? How?

root can kill any program run by any user. Is it possible for a user to kill another user's program without using sudo, etc.? Example: How can make user foo kill program x which is run by user bar?
3
votes
3answers
1k 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.
5
votes
1answer
3k views

Why does setuid not work? [duplicate]

I want to ensure that my program can only be run by user xyz using root privilege. To do this, I set the setuid bit with: chmod u+s program1.sh ls -l program1.sh rwsr-x--- 1 root house 1299 May 15 23:...
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 ...
-2
votes
1answer
50 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 ...
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
62 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 /...
7
votes
0answers
279 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
397 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 ...
33
votes
7answers
47k views

Linux: allowing an user to listen to a port below 1024

I need to allow an user (different from root) to run a server listening on port 80. Is there any way to do this?
4
votes
1answer
2k 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 ...
7
votes
3answers
21k views

How to create an unprivileged user in CentOS?

I want to create an unprivileged user to run my RhodeCode server and Celery daemon on a CentOS instance. I think the accepted definition of this is no home directory, login disabled, and no shell ...
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
36 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
594 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
27 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
284 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
554 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 ...
6
votes
2answers
16k views

I'm not getting privileges, edited /etc/sudoers [duplicate]

I want to run any program without asking root password. Because I'm the only person who use the system. So I googled and edited /etc/sudoers. What I did: # chmod 640 /etc/sudoers # vim /etc/sudoers ...
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
921 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 ...
101
votes
8answers
18k 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 ...