Home Man
Today's Posts

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

Sudo Problem?


Login to Reply

Thread Tools Search this Thread
# 1  
Old 04-08-2010
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...
# 2  
Old 04-08-2010
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?

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

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem using sudo with NOPASSWD aigini82 HP-UX 3 04-12-2016 04:17 AM
Problem connect to a different server then do sudo login and finally run some scripts and get result Devesh5683 Shell Programming and Scripting 2 04-21-2014 02:51 AM
ssh foo.com sudo command - Prompts for sudo password as visible text. Help? fluoborate Shell Programming and Scripting 9 11-02-2011 02:18 PM
sudo wildcards problem: for every argument a *-wildcard? Better solution? slashdotweenie UNIX for Advanced & Expert Users 2 09-20-2011 10:12 AM
Problem with Sudo inside a here document mnanavati UNIX for Dummies Questions & Answers 0 11-12-2010 03:23 PM
Problem with password expire and sudo. sparcman Solaris 2 04-14-2010 01:18 PM
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

All times are GMT -4. The time now is 11:41 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password