LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   About sudo (https://www.linuxquestions.org/questions/linux-security-4/about-sudo-330812/)

alnreddy 06-06-2005 05:40 AM

About sudo
 
Hi all,
I need to give full access for users in the sudo file

I tried so many times but no use

anyone can help me

huibert.alblas 06-06-2005 07:11 AM

here is my sudo config.
You can change yours with the command "visudo"

Code:

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Benutzer Gruppen Definitionen
User_Alias ROOT_USERS  =      USER1,USER2

# Kommando GRuppen Definitionen
Cmnd_Alias      ROOT_SHELL      = /bin/su

# Berechtigungs Definitionen
ROOT_USERS      ALL=ROOT_SHELL

Substitiute USER1 and USER2 with the users who are allowed to get a root shell.
For security reasons this is not considered "best practise"
You should define some real policies and give the users only the access they really need.

This example hover is from a server on which a friend of mine and I both need root permission.

Now as USER1 do "sudo su" and you will be prompted for the password of USER1.

Simple, uh?

Happy hacking.

alnreddy 06-13-2005 05:58 AM

Sudo Problem
 
Hi,

what ever you send that has tried in my system
User_Alias ROOT_USERS = ranga
Cmnd_Alias ROOT_SHELL = /bin/su
ROOT_USERS ALL=ROOT_SHELL

After this i logon on the usermode

its not login

if you don,t mind you explain clearly

In which site documentation is avaliable

huibert.alblas 06-13-2005 12:53 PM

You need to be more precice in what you are trying to do.

"After this i logon on the usermode its not login "

is not an adequate problem discription.
I don't know your user mode, "it's not login" does not say _how_ you tried to login, nor does it state what exactly failed.

A better description would be like:
Code:

I made the changes to the sudo config as root like this
"visudo"
After I safed my changes the new configuration was accpeted by sudo
(It does print this in the shell after you close the editor)

Then I logged into a terminal (or with ssh) as a normal user.
Then, as this user I tried
"sudo su"
Which prompted for a password.
I typed in my root password, but it says "wrong password"

That kind of description helps others to understand what you have been trying to do, and at what point axactly things went wrong.

My example is easily fixed: after doing "sudo su" you are prompted for a password, but this is not the root password, but your user account password.
(that's what sudo is for)

So please explain your self better.

- What do you want to do?
- (maybe)answer: (I want to give my users root access, without them having to know the root password)
- How did you try it?
- (maybe)answer: (edited the sudo config with visudo, you errors were repoerted)
- then what did you type
- (sudo su)
- what went wrong? what was the exact message the system gave you? what had you expected the message would be?

That would certainly help.


All times are GMT -5. The time now is 01:46 PM.