LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-20-2006, 04:47 AM   #1
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
Question /etc/sudoers problem


Hello!
I have a Ubuntu server 6.06, and what i want to do is grant access to a user (say 'test') on a program (say centericq).
What i have done is:
1) create file 'center' in /usr/bin with chmod 755
'center' contains:
Code:
{ sudo /usr/bin/centericq; }
2) added the following line in /etc/sudoers
Code:
test ALL = NOPASSWD: /usr/bin/centericq
3) when i run 'center' as 'test' i get:
Code:
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid
/usr/bin/center: line 1: 20772 Aborted                 sudo /usr/bin/centericq
Now i know there is a problem here i just don't know what it is. Can you help me?
 
Old 10-20-2006, 05:45 AM   #2
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Rep: Reputation: 16
I'm not really sure what is happening, but why have you put the curly braces around line 1? I assume it is meant to be a bash script so it should also start with #!/bin/sh on the first line.
 
Old 10-20-2006, 08:07 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Does the same error occur when you run as your main user with sudo (typing in the password if necessary)?

The error doesn't look to me to be to do with sudo.

One other question - why run this icq chat client with sudo?
 
Old 10-21-2006, 09:07 AM   #4
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
When i use root it works fine. i have two similar scripts that work perfectly, they're something like:
Code:
{ sudo /usr/bin/true_etrace "$1"; }
and they work.

I want to run it with sudo so that only one user can acces it beside root.
Thanks!
 
Old 10-21-2006, 10:11 AM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
That's curious - it looks like the sudoers file appears to be set up correctly.

Can you do the following commands (as the user for whom the sudo command fails) and post the output?

Code:
id
ls -l /usr/bin/center* /usr/bin/true_etrace
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 06:03 PM
Sudoers problem hinetvenkat Linux - Security 3 05-14-2005 12:47 PM
sudoers problem kzar Linux - General 5 12-09-2004 05:59 PM
sudoers usa1234 Linux - General 1 10-24-2004 04:07 PM
sudoers........ help linuxlah Linux - General 4 01-15-2003 12:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration