Prev: How do I restore with Time Machine?
Next: The Apple Two The iPad is Steve Jobs' final victory over the company's co-founder Steve Wozniak.
From: laredotornado on 26 Apr 2010 17:11 On Apr 26, 1:28 pm, Jolly Roger <jollyro...(a)pobox.com> wrote: > In article > <28ac1987-ba86-4ce3-b562-3981cae0f...(a)h16g2000prf.googlegroups.com>, > > laredotornado <laredotorn...(a)zipmail.com> wrote: > > Hi, > > > I'm using Mac 10.6.3. I'm a sudo user. On my machine, I frequently > > need to restart my Apache web server, and hwen I pop open my terminal > > and type > > > > sudo /usr/sbin/apachectl restart > > > I'm prompted for a password immediately after. Is there a way I can > > avoid having to type my password and just enter the command above? > > > Thanks, - Dave > > The most secure way to do this is by editing the /etc/sudoers file to > contain an entry that allows NOPASSWD access for particular commands. > For instance, if you wanted to allow NOPASSWD access for the user named > dave to the apachectl command, you would add entries similar to this: > > Cmnd_Alias APACHECTL = /usr/sbin/apachectl > dave ALL = NOPASSWD:APACHECTL > > For more information, read the sudo and sudoers manual pages. > > -- > Send responses to the relevant news group rather than email to me. > E-mail sent to this address may be devoured by my very hungry SPAM > filter. Due to Google's refusal to prevent spammers from posting > messages through their servers, I often ignore posts from Google > Groups. Use a real news client if you want me to see your posts. > > JR This is the solution I went with and it worked perfectly. 5 stars. - Dave
From: laredotornado on 3 May 2010 12:26 On Apr 26, 4:11 pm, laredotornado <laredotorn...(a)zipmail.com> wrote: > On Apr 26, 1:28 pm, Jolly Roger <jollyro...(a)pobox.com> wrote: > > > > > In article > > <28ac1987-ba86-4ce3-b562-3981cae0f...(a)h16g2000prf.googlegroups.com>, > > > laredotornado<laredotorn...(a)zipmail.com> wrote: > > > Hi, > > > > I'm usingMac10.6.3. I'm a sudo user. On my machine, I frequently > > > need to restart my Apache web server, and hwen I pop open my terminal > > > and type > > > > > sudo /usr/sbin/apachectl restart > > > > I'm prompted for a password immediately after. Is there a way I can > > > avoid having to type my password and just enter the command above? > > > > Thanks, - Dave > > > The most secure way to do this is by editing the /etc/sudoers file to > > contain an entry that allows NOPASSWD access for particular commands. > > For instance, if you wanted to allow NOPASSWD access for the user named > > dave to the apachectl command, you would add entries similar to this: > > > Cmnd_Alias APACHECTL = /usr/sbin/apachectl > > dave ALL = NOPASSWD:APACHECTL > > > For more information, read the sudo and sudoers manual pages. > > > -- > > Send responses to the relevant news group rather than email to me. > > E-mail sent to this address may be devoured by my very hungry SPAM > > filter. Due to Google's refusal to prevent spammers from posting > > messages through their servers, I often ignore posts from Google > > Groups. Use a real news client if you want me to see your posts. > > > JR > > This is the solution I went with and it worked perfectly. 5 stars. - > Dave I need to revive this thread because I just switched to a new machine (still a Mac 10.6.3), but even though my /etc/sudoers file contains # User privilege specification root ALL=(ALL) ALL %admin ALL=(ALL) ALL davea ALL = NOPASSWD:APACHECTL I'm still being prompted for my password when trying to restart apache ... davea-mbp2:~ davea$ sudo /usr/sbin/apachectl restart Password: Any ideas what I may be missing? Thanks, - Dave
From: Warren Oates on 3 May 2010 13:42
In article <a53b3aec-5305-4384-af44-63120890ae91(a)g39g2000pri.googlegroups.com>, laredotornado <laredotornado(a)zipmail.com> wrote: > Any ideas what I may be missing? Thanks, - Dave You'll have to include httpd in your sudoers file, I guess; apachectl is a shell script that invokes it. -- Very old woody beets will never cook tender. -- Fannie Farmer |