Unix/Linux Go Back    

Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Sudo Problem?


Thread Tools Search this Thread Display Modes
Old Unix and Linux 04-08-2010   -   Original Discussion by datkan
datkan's Unix or Linux Image
datkan datkan is offline
Registered User
Join Date: Feb 2010
Last Activity: 22 September 2010, 7:56 AM EDT
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Sudo Problem?

Hi I wanted to add a group using 1 id which is not root but has some sudo privileges.

test@test>sudo -l 
gives this
(root) NOPASSWD: /usr/bin/passwd, /usr/sbin/useradd, /usr/sbin/usermod, /usr/sbin/userdel, /usr/bin/tee, /usr/bin/grep, /bin/grep, /usr/bin/chmod, /bin/chmod, /usr/bin/echo, /bin/echo, /usr/bin/cat, /bin/cat, /usr/bin/logins, /usr/bin/ls, /bin/ls, /usr/bin/faillog, /usr/bin/chage, /usr/bin/groups, /usr/bin/ed, /bin/ed, /usr/sbin/groupadd, /usr/sbin/groupmod, /usr/sbin/groupdel, /usr/bin/rm, /bin/rm, /usr/bin/mv, /bin/mv, /usr/bin/sed, /bin/sed, /usr/bin/touch, /bin/touch, /usr/bin/cp, /bin/cp, /usr/bin/awk, /bin/awk, /usr/bin/cut, /bin/cut, /usr/bin/gpasswd, /bin/gpasswd, /usr/sbin/faillog
test@test> cd /usr/sbin
test@test> sudo groupadd testgrp
test's password:<enter>
test@test> cat /etc/group

Group Not Added

test@test> sudo groupadd testgrp
test's password:<test's passwd>
sudo: groupadd: command not found

What Am I doing wrong over here?

Thanks in advance

Last edited by pludi; 04-08-2010 at 03:11 AM.. Reason: code tags, please...
Sponsored Links
Old Unix and Linux 04-08-2010   -   Original Discussion by datkan
mark54g's Unix or Linux Image
mark54g mark54g is offline Forum Advisor  
Registered User
Join Date: May 2008
Last Activity: 26 July 2013, 11:43 AM EDT
Location: Northeastern United States
Posts: 918
Thanks: 1
Thanked 61 Times in 58 Posts
do a "which groupadd" maybe since it is in /usr/sbin/ and not part of a normal user's path, you need to invoke it with the full PATH? Linux

Also, since . is not in the PATH (And it should not be) you should try ./groupadd when running in the /usr/sbin/ directory.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:" Chloe123 UNIX for Dummies Questions & Answers 1 12-21-2009 04:09 PM
shell script problem , sudo mount command cola Shell Programming and Scripting 3 08-19-2009 02:09 PM
Sudo command problem mindtee_abhi UNIX for Advanced & Expert Users 4 03-17-2009 01:24 AM
problem with sudo su and .sh script cleansing_flame Shell Programming and Scripting 1 01-14-2008 02:32 PM
entry in /etc/group too long - problem using sudo with %group poli Solaris 4 12-21-2004 08:50 AM

All times are GMT -4. The time now is 02:20 AM.