sudo wildcards problem: for every argument a *-wildcard? Better solution?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users sudo wildcards problem: for every argument a *-wildcard? Better solution?
# 1  
Old 09-20-2011
sudo wildcards problem: for every argument a *-wildcard? Better solution?

Hi

I allow the user tommy to run this command as root

Code:
sudoCommand: /app/appname/connectors/*/*/current/bin/*

With "sudo -l" he sees the sudoers, but is unable to execute.

Code:
$ sudo /app/appname/connectors/zur/namename/current/bin/othername agentsvc --i --u root --sn 1m7command
Sorry, user tommy is not allowed to execute '/app/appname/connectors/zur/namename/current/bin/othername agentsvc --i --u root --sn 1m7command' as root on testcentbox07.

I guess because of wildcard arguments. Does every argument needs a *-wildcard? Howto do when I don't know the number of arguments?
# 2  
Old 09-20-2011
What have you in sudoers files?
I suppose you would need something like:
Code:
/app/appname/connectors/*/*/current/bin/* *

So that it accept all arguments...
# 3  
Old 09-20-2011
Quote:
Originally Posted by vbe
What have you in sudoers files?
Sudoers is in LDAP. See sudoCommand in original posting

Sudoers LDAP Manual

Quote:
Originally Posted by vbe
I suppose you would need something like:
Code:
/app/appname/connectors/*/*/current/bin/* *

So that it accept all arguments...
works only with one argument. Doesn't work.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wildcard in mailx argument

Hi All, I have to send some files as attachments to an email using mailx copmmand in a shell script. The files will be generated by some other application everyday with names starting with the literal 'Send' followed by some random sequence of characters in the filenames. I tried... (1 Reply)
Discussion started by: sagarparadkar
1 Replies

2. UNIX for Dummies Questions & Answers

Problem with use of the ? wildcard in regex substitution.

I'm trying to use Larry Wall's rename (prename) tool to rename multiple files: $ ls -1 blar.m4mp3 BLAH.mpmp3 bar foo.m4mp3 foo bar.mpmp3 I'm trying to fix the extensions so they're all .mp3: rename 's/m?mp3/mp3/' *mp3 I expect m?mp3 to match the extensions,... (3 Replies)
Discussion started by: ropers
3 Replies

3. Shell Programming and Scripting

Problem when concatinating wildcard onto file location in bash script

I am having difficulty with the following script: #! /bin/bash filelist=~/data/${1}* ~/./convertFile $filelist ~/temp/outputEssentially, there are a large number of files in the directory ~/data, each with a four-letter code at the beginning (eg. aaaa001 aaaa002 bbbb001 bbbb002 etc). The... (11 Replies)
Discussion started by: Lears_Fool
11 Replies

4. Solaris

Problem in using wildcard characters in xargs with find

Hi, Under my parent diectory I have directory named "Response" in many of its subfolders. I am interested to see all files with extention .pro in Response Directory. I am giving following command - find . -name "Response" -type d | xargs -i ls -lrt {}/*.pro but it is not giving result. ... (3 Replies)
Discussion started by: sanjay1979
3 Replies

5. UNIX for Dummies Questions & Answers

how to check if the argument contain wildcard (*,?) ?

In a script , i would like to check if the argument ( $1, $2 inside the script) contain wildcard (*,? etc). how do i do it? > script_name arg1 arg* $1 (arg1) does not contain wildcard, but $2 (arg* )contains wildcard. how can i tell in script? i need to do this is because : if arg1... (3 Replies)
Discussion started by: gusla
3 Replies

6. UNIX for Dummies Questions & Answers

Find wildcard .shtml files in wildcard directories and removing them- How's it done?

I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days... The structure of the paths are like this: /home/domains/www.domain2.com/tgp/ /home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko
1 Replies
Login or Register to Ask a Question