Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sudo to delegate permission from non-root user to another non-root user Post 302619985 by canar on Friday 6th of April 2012 05:03:24 PM
Old 04-06-2012
Sudo to delegate permission from non-root user to another non-root user

I've been through many threads before i decide to create a separate thread.
I can't really find the solution to my (simple) problem.

Here's what I'm trying to achieve:
As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user.

The only to achieve this is to give "canar" user root permission in sudoers, see below:

Host_Alias LAB = linuxbox
User_Alias LABTRUSTED = canar
Cmnd_Alias LABADMIN = /bin/bash, /bin/su, /bin
LABTRUSTED LAB=(ALL) NOPASSWD: LABADMIN

And run any command:

canar@linuxbox$ sudo -i -u duck 'id'


But basically, this is a huge security hole since canar can run whatever he wants as anyone (including root)
I want to restrict canar user to be able to login as duck user (or as anyone from a given group) without providing root access

Edit:
want to restrict canar user to be able to run an identified command as duck user (or as anyone from a given group) without providing root access

Any help would be welcome!
Smilie
~canar
 

10 More Discussions You Might Find Interesting

1. Solaris

cant able to change permission in a DIR as root user

Hi my directory not accepting any commands. its simply telling permission denied. i tried ( cp, mv, rm ) as roor i want to set default permissons to this DIR please find the Logs below. dr-xr-xr-x 1 root root 1 Jun 1 09:04 AP1_ROP ( original dir) root> chmod 777... (5 Replies)
Discussion started by: vijayq8
5 Replies

2. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

3. Shell Programming and Scripting

Cron job initiating ssh AND sudo (from user, not root)

I've been bashing my head on the desk for 2 days trying to get this to work, but I've had no luck. I'll try to be as clear as possible in my explanation without dragging out the details. I'm trying to set up a cron job for user "john" which runs a script. This script initiates an ssh connection to... (5 Replies)
Discussion started by: eh3civic
5 Replies

4. Shell Programming and Scripting

Can root user run chmod 000 permission shell script?

Hi, I have a shell script file which is set to access permission 000. When I login as root (sudo su) and try to run this script, I am getting the Permission denied error. I have read somewhere that root admin user can execute any kind of permission script. Then why this behavior? However, I can... (1 Reply)
Discussion started by: royalibrahim
1 Replies

5. Solaris

User want to full root permission

hi guys.. how to give root permission for particular user tel me step by step (2 Replies)
Discussion started by: coolboys
2 Replies

6. UNIX for Advanced & Expert Users

Root and non-root user not able to delete the file

Hi!! one strange problem occurred with my RHEL 5 box. i'm having logs folder with ownership of non-root user. Created some files with root user under logs folder. here is the scene: -rw-r----- 1 root root 1048227 Feb 28 12:34 SystemOut_13.02.28_12.34.10.log -rw-r----- 1 root root ... (6 Replies)
Discussion started by: sukhdip
6 Replies

7. Shell Programming and Scripting

How to give root access to non root user?

Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal. I want to give some users a root level access. Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way Regards ADI (4 Replies)
Discussion started by: adisky123
4 Replies

8. UNIX for Dummies Questions & Answers

Create user with sudo ability to root.

Hi All, I need to give an user sudo ability to root. We have also generated RSA key but unable to proceed further. For example after a user logs into the server normally and when he executes below command $ssh root@server_name This should take you to root prompt # Please help me.... (3 Replies)
Discussion started by: Rockyc3400
3 Replies

9. Red Hat

Sudo to user other than root but do not allow sudo to root

I have a set of RHEL 5 boxes running our ERP software on Oracle databases. I need to allow my DBA's to su to oracle and one other account (banner) without knowing the oracle or banner password. But I need to prevent them from su'ing to any other user especially root. I only want them to be able to... (1 Reply)
Discussion started by: westmoreland
1 Replies

10. Solaris

Sudo access of rm to non-root user

Hello, It is Solaris-10. There is a file as /opt/vpp/dom1.2/pdd/today_23. It is always generated by root, so owned by root only. This file has to be deleted as part of application restart always and that is done by app_user and SA is always involved to do rm on that file. Is it possible to give... (9 Replies)
Discussion started by: solaris_1977
9 Replies
pdebuild-user-mode-linux(1)					     pbuilder					       pdebuild-user-mode-linux(1)

NAME
pdebuild-user-mode-linux - pbuilder-user-mode-linux way of doing debuild SYNOPSIS
pdebuild-user-mode-linux [pdebuild-user-mode-linux options] -- [pbuilder-user-mode-linux options] DESCRIPTION
A convenience program for pbuilder-user-mode-linux which invokes pbuilder after obtaining appropriate root privilege in a Debian source directory. One must be inside the source tree containing the debian directory, in order to make it work. PDEBUILD OPTIONS
--buildsourceroot [fakeroot] The command used to gain root privilege for invoking dpkg-buildpackage --auto-debsign Invoke debsign at the end of pdebuild process. --debsign-k [key-id] Pass -k option to debsign to specify which keyid to sign. --buildresult [Directory for build results] The place which build result is stored. --configfile [Extra config file to use] The configuration file is used, but not passed on to pbuilder-user-mode-linux. --debbuildopts [options to pass to dpkg-buildpackage] The space-delimited list of options are passed to dpkg-buildpackage. This option appends to pbuilder option --debbuildopts and may also be used to reset the list of options by passing the empty string. --use-pdebuild-internal Uses a different implementation of pdebuild, which calls clean and build inside the chroot, using bind-mounts. pdebuild-internal tries to run debian/rules clean inside the chroot. To achieve the goal, the working directory is passed on inside the chroot, in the form of bind-mounting and debuild is run. This option will not protect the working directory and its parent directories from the build scripts. -- [pbuilder options] After the -- symbol, an arbitrary number of pbuilder options can be specified. See pbuilder-user-mode-linux.1 for full list of options. There is an exception that --buildresult needs to be specified as pdebuild option before the -- to be effective. FILES
/etc/pbuilderrc The configuration file for pbuilder-user-mode-linux, used in pdebuild-user-mode-linux. /usr/share/pbuilder/pbuilderrc The default configuration file for pbuilder-user-mode-linux, used in pdebuild-user-mode-linux. ${HOME}/.pbuilderrc Configuration file for pbuilder-user-mode-linux, used in pdebuild-user-mode-linux, overrides what is written in /etc/pbuilderrc AUTHOR
Initial coding, and main maintenance is done by Junichi Uekawa <dancer@debian.org>. The homepage is available at http://pbuilder.alioth.debian.org SEE ALSO
/usr/share/doc/pbuilder/pbuilder-doc.html, pbuilder-user-mode-linux(1), pbuilderrc(5), pbuilder-uml.conf(5) Debian 2006 May 24 pdebuild-user-mode-linux(1)
All times are GMT -4. The time now is 06:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy