Visit The New, Modern Unix Linux Community


Save sudo privilege for session

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Save sudo privilege for session
# 1  
Question Save sudo privilege for session

I have setup public key based login to my CentOS VPS. I wish to disable direct root login and have created an admin user under wheel group and have modified /etc/sudoers file and gave Wheel group all privileges.

But now I am being prompted for password whenever I type sudo. I do not wish to disable password prompting completely, but would like to save the status after first authentication.

Is this possible?
# 2  
You can increase the timeouts, so it only asks you the password if you haven't used sudo in a while. Not sure you really want it saved forever, what if you have to walk away from the computer for a bit?
This User Gave Thanks to Corona688 For This Post:
# 3  
Thanks. 30 mins should be more than enough for me.

One more question. In the thread that you linked to, it is mentioned that the sudoers file should be edited only with visudo. Yesterday I edited it with vi. Is it a problem?
# 4  
Quote:
Originally Posted by JoyceBabu
Thanks. 30 mins should be more than enough for me.

One more question. In the thread that you linked to, it is mentioned that the sudoers file should be edited only with visudo. Yesterday I edited it with vi. Is it a problem?
It's a problem if you make a mistake. Use visudo because it runs sanity checks on sudoers as well as other things.

snippet from the man page
Code:
       visudo edits the sudoers file in a safe fashion, analogous to vipw(8).
       visudo locks the sudoers file against multiple simultaneous edits,
       provides basic sanity checks, and checks for parse errors.  If the
       sudoers file is currently being edited you will receive a message to
       try again later.

This User Gave Thanks to frank_rizzo For This Post:
# 5  
Thanks for the clarification frank. Fortunately, I was the only person editing the file at that time. And all I did was remove the comment from the line granting wheel group all permissions.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #49
Difficulty: Easy
A USB hard drive is considered to be a primary storage device for personal computers.
True or False?

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to execute command remotely as sudo and save the output locally?

Hello , I am trying to run a NetBackup command in remote server. Also this command can only be run by root so I am using sudo . Also I want the output of the command locally in a file. The below command asked for password , ran successfully and showed Output on my local server screen ... (2 Replies)
Discussion started by: rahul2662
2 Replies

2. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies

3. UNIX for Dummies Questions & Answers

Putty session freezes when sudo

I have a Windows batch file with the below entry for auto login. putty.exe -ssh user1@10.10.10.7 -pw passwd1 -m command.txtcommnd.txt contains the below entries pwd sudo su - user2Switching from user1 to user2 does not require any password . Output just prints the pwd and not sudo When i... (6 Replies)
Discussion started by: mohtashims
6 Replies

4. Cybersecurity

sudo - AIX - User privilege specification

I am planning to implement sudo for users. Under , it looks I have to put the users who need to have sudo access: What are the recommended for users? I don't think I need to give the ALL privilege (i.e ) to AIX users. I'd like to know the commonly used privilege specification for sudo... (1 Reply)
Discussion started by: Daniel Gate
1 Replies

5. AIX

sudo - User privilege specification

I am planning to implement sudo for users. Under , it looks I have to put the users who need to have sudo access: What are the recommended for users? I don't think I need to give the ALL privilege (i.e ) to AIX users. I'd like to know the commonly used privilege specification for sudo... (9 Replies)
Discussion started by: Daniel Gate
9 Replies

6. UNIX for Dummies Questions & Answers

the command to save session

I remember there is a command you can type and it records everything you type on after it...anybody can help a bit? (2 Replies)
Discussion started by: fedora
2 Replies

7. Solaris

I am not able to login in gnome session and java session in Sun solaris 9& 10

I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies

8. Shell Programming and Scripting

sqlplus session being able to see unix variables session within a script

Hi there. How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly. sqlplus << EOF user1@db1/pass1 BEGIN PACKAGE1.perform_updates($1,$2,$3); END; EOF Thanks in advance, Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies

Featured Tech Videos