LinuxQuestions.org
Help answer threads with 0 replies.
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 05-26-2007, 02:49 AM   #1
nerooo
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
sudo


I have a question about sudo. Currently, when I use sudo on a system, I don't have to supply a password for restarting apache. Is it possible to set a password and pipe it to sudo?
 
Old 05-26-2007, 04:35 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I guess it is, but to me it sounds like a security risk "piping" a password, especially if you thought to do it clear-text-wise.

EDIT: of course it's not good having no password at all, either.
 
Old 05-26-2007, 04:40 AM   #3
nerooo
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by b0uncer
I guess it is, but to me it sounds like a security risk "piping" a password, especially if you thought to do it clear-text-wise.

EDIT: of course it's not good having no password at all, either.
I wasn't planning on doing in real clear text. But using a C application something like this:

char pass[20]={98,105,106,111};
sprintf(cmd, "echo %c%c%c%c | sudo -S /etc/init.d/apache2 restart", pass[2], pass[3], pass[0], pass[1]);
system(cmd);
 
  


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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 04:20 PM
Sudo without having to type "sudo?" Mitch G Linux - Security 3 09-28-2006 03:16 PM
sudo loopoo AIX 7 01-30-2006 11:16 AM
sudo pk21 Linux - Newbie 7 10-07-2003 08:53 AM


All times are GMT -5. The time now is 03:28 AM.

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