System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help Sudoer file for Sudo

baong
Frequent Advisor

Need Help Sudoer file for Sudo

Hi All,
I need help in sudoer file. I have define few line below

Runas_Alias DB = oracle, sybase

# User privilege specification
sybasev2 All=(ALL) SETENV: ALL

# DBA can run commands as oracle or sybase without a password
sybasev2 ALL = (DB) NOPASSWD: ALL

when i type command sudo sybasev2 -> got an error "user NOT in sudoers"

Actually what i want to do is i want to create user account sybasev2 act as like root.
If someone can help me out here i would appreciate
7 REPLIES
Tingli
Esteemed Contributor

Re: Need Help Sudoer file for Sudo

This is what you find in man sudoers.

%wheel ALL = (ALL) ALL

here the wheel is a group and anyone in the wheel group can have root privilege.

You need to login in as sybasev2 and run sudo to get what you want.
baong
Frequent Advisor

Re: Need Help Sudoer file for Sudo

Thanks for replay quick, but where do they define %wheel ? i could not find in /etc/group.Please help me out here..THanks again
OldSchool
Honored Contributor

Re: Need Help Sudoer file for Sudo

%wheel is a grouping definded in sudo. its not part of the unix "groups"
baong
Frequent Advisor

Re: Need Help Sudoer file for Sudo

Thanks Oldschool, So how would i define or adding the users into group "wheel", which file i need to adding them in. I am thinking in /etc/group ?? Please let me know..
Thanks
OldSchool
Honored Contributor

Re: Need Help Sudoer file for Sudo

add "wheel" in the unix groups file, wiht the appropriate members.

then you should be able to modify "%wheel" actions / defiitions in sudoers
Amitav
Frequent Advisor

Re: Need Help Sudoer file for Sudo

Here you can do 2 things:

1> Put the user in the group where root exists, so it will have all the permissions of root.

2> You can otherwise create the user and give permission like

ALL=ALL

But before giving root to anyuser, make sure what you are giving to him...!!
baong
Frequent Advisor

Re: Need Help Sudoer file for Sudo

Thanks Anita,
what i did in /etc/group added
root::0:root,

In sudoer file :

Cmnd_Alias REBOOT = /usr/sbin/reboot
Cmnd_Alias SHUTDOWN = /usr/sbin/shutdown

ALL = NOPASSWD: ALL, !REBOOT, !SHUTDOWN

# sudo
(They still ask me for password )

Can someone see what i did wrong?
Thanks for all of you input...