LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2011, 10:46 AM   #1
pandunr
LQ Newbie
 
Registered: May 2011
Posts: 12

Rep: Reputation: Disabled
Usage of sudo


Is it possible accept justification before password for Sudo login

Ex :

Login : ABCDEF
Password: *******
Sudo su - applicationid
Justfication : Sustain
ABCDEF Paswword : ******

Is it possible to configure in Linux as explained above.

Immediate suggestion very much appreciated.
 
Old 05-27-2011, 11:06 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
no. I'd suggest that if you want that level of control letting them only execute a wrapper script via sudo and have that script ask for the input.
 
Old 05-27-2011, 11:15 AM   #3
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 57
I assume this is for some sort of 'logging'? Like "why did you run sudo"?

I'd agree with acid_kewpie there. I would recommend a wrapper (easily implemented in visudo). Expect a lot of nonsense or non-useful responses
 
Old 05-27-2011, 12:51 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
if you do do this, be aware of a number of useful environmental variables, e.g. SUDO_USER etc, which you can use with a script to find out who is using sudo from the inside:
Code:
       SUDO_COMMAND    Set to the command run by sudo

       SUDO_USER       Set to the login of the user who invoked sudo

       SUDO_UID        Set to the uid of the user who invoked sudo

       SUDO_GID        Set to the gid of the user who invoked sudo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
LXer: sudo install, usage and sudoers config file basics LXer Syndicated Linux News 0 08-29-2010 01:30 PM
[SOLVED] Usage of sudo command in Ubuntu and Red Hat saagar Linux - Newbie 3 04-18-2010 07:49 PM
sudo usage- basic question groxy Linux - General 4 12-06-2007 08:16 AM
sudo command usage??? pagadala_cs Linux - Software 1 12-24-2004 11:13 AM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration