Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Sudo asked for root password . Post 302993368 by drysdalk on Thursday 9th of March 2017 08:08:20 AM
Old 03-09-2017
Hi,

Interesting. I hadn't heard of this before, but from some quick Googlings it seems that this is the default behaviour of sudo on openSUSE. If you edit the sudoers file you'll probably find a line like this:

Defaults targetpw

If you comment that line out, then sudo should prompt for the user's own password rather than the password for the root account.

On to your second point, specifying commands a user or group can run. That can be done with an entry like this (in this case, I'm specifying the commands that members of the unixforum group can run without being prompted for a password):

%unixforum ALL=NOPASSWD: /bin/ls,/bin/mkdir,/bin/rmdir

Here's an example session with that entry in place (and still with Defaults targetpw set to give a clear contrast):

Code:
$ id
uid=1002(unixforum) gid=1002(unixforum) groups=1002(unixforum)
$ sudo /bin/ls /root
Desktop  mbox  Pictures
$ sudo /bin/mkdir /root/testdir
$ sudo /bin/ls -ld /root/testdir
drwxr-xr-x 2 root root 4096 Mar  9 13:03 /root/testdir
$ sudo /bin/rmdir /root/testdir
$ sudo /usr/bin/vim
[sudo] password for root: 
$

Hope this helps.
This User Gave Thanks to drysdalk For This Post:
 

10 More Discussions You Might Find Interesting

1. Linux

sudo, root password

Hi all.. I'm secering a RH 2.1 server, with gnome (not my choice...), as X manager. Is ther anyway to get sudo ask for root password other then the actual user's password? Like when you launch the graphical IHM to create a new user, it asks for root's password? Is there a way to do the same... (5 Replies)
Discussion started by: penguin-friend
5 Replies

2. Shell Programming and Scripting

how to set up ssh, so password not asked

Hi All Plz guide me in setting ssh on local machine so that password will not be asked. I have written a script abc.ksh on machineA to execute a script sampletest.ksh available on machineB Conent of abc.ksh is as follows ssh -q bali@machineB sh ClaimGenFeed/claim/sampletest.ksh... (1 Reply)
Discussion started by: balireddy_77
1 Replies

3. Solaris

Solaris 8 - Asks for current root password when trying to change root password.

Hello All, I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies

4. Shell Programming and Scripting

Username password asked during loging

Hi, Whenever I open my unix box,after providing username and password I get the following message. Are you authorised to use this computer as detailed above? (Y)es/(N)o : y Export: Release 10.2.0.2.0 - Production on Mon May 16 16:00:15 2011 Copyright (c) 1982, 2005, Oracle. All rights... (5 Replies)
Discussion started by: emilybose
5 Replies

5. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

6. HP-UX

How to set up "sudo su -" to root with no need to type password?

Tittle has it.... Thanks friends... (2 Replies)
Discussion started by: 300zxmuro
2 Replies

7. Solaris

Lost Root Password on VXVM Encapsulated Root Disk

Hi All Hope it's okay to post on this sub-forum, couldn't find a better place I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
Discussion started by: sunnyd76
1 Replies

8. HP-UX

Sudo entry required to set permission similar to ROOT without using password (PASSWD) change optio

Hi All I had installed sudo in HP UX 11.3 and it is working fine but not able to make entry required to set permission similar to ROOT without using password (PASSWD) change option for define user in /etc/sudoers file Please help if some know the syntex? :confused::wall: (2 Replies)
Discussion started by: deviltech
2 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. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies
PAM_SSS(8)							 SSSD Manual pages							PAM_SSS(8)

NAME
pam_sss - PAM module for SSSD SYNOPSIS
pam_sss.so [quiet] [forward_pass] [use_first_pass] [use_authtok] [retry=N] DESCRIPTION
pam_sss.so is the PAM interface to the System Security Services daemon (SSSD). Errors and results are logged through syslog(3) with the LOG_AUTHPRIV facility. OPTIONS
quiet Suppress log messages for unknown users. forward_pass If forward_pass is set the entered password is put on the stack for other PAM modules to use. use_first_pass The argument use_first_pass forces the module to use a previous stacked modules password and will never prompt the user - if no password is available or the password is not appropriate, the user will be denied access. use_authtok When password changing enforce the module to set the new password to the one provided by a previously stacked password module. retry=N If specified the user is asked another N times for a password if authentication fails. Default is 0. Please note that this option might not work as expected if the application calling PAM handles the user dialog on its own. A typical example is sshd with PasswordAuthentication. MODULE TYPES PROVIDED
All module types (account, auth, password and session) are provided. FILES
If a password reset by root fails, because the corresponding SSSD provider does not support password resets, an individual message can be displayed. This message can e.g. contain instructions about how to reset a password. The message is read from the file pam_sss_pw_reset_message.LOC where LOC stands for a locale string returned by setlocale(3). If there is no matching file the content of pam_sss_pw_reset_message.txt is displayed. Root must be the owner of the files and only root may have read and write permissions while all other users must have only read permissions. These files are searched in the directory /etc/sssd/customize/DOMAIN_NAME/. If no matching file is present a generic message is displayed. SEE ALSO
sssd(8), sssd.conf(5), sssd-ldap(5), sssd-krb5(5), sssd-simple(5), sssd-ipa(5), sssd-ad(5), sssd-sudo(5),sss_cache(8), sss_debuglevel(8), sss_groupadd(8), sss_groupdel(8), sss_groupshow(8), sss_groupmod(8), sss_useradd(8), sss_userdel(8), sss_usermod(8), sss_obfuscate(8), sss_seed(8), sssd_krb5_locator_plugin(8), sss_ssh_authorizedkeys(8), sss_ssh_knownhostsproxy(8),pam_sss(8). AUTHORS
The SSSD upstream - http://fedorahosted.org/sssd SSSD
06/17/2014 PAM_SSS(8)
All times are GMT -4. The time now is 05:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy