[CentOS] Odd failure of smbd to start from init.d - CentOS 5.4

Brunner, Brian T. BBrunner at gai-tronics.com
Tue May 25 22:24:43 UTC 2010


WTE?
do
printenv > dot.slash.env 
add to /etc/init.d/smb
printenv > ~/init.d.smb.env
then execute /etc/init.d/smb

There has got to be a difference between the two environments causing
identical scripts to behave differently depending on how they're
executed.

unless

PATH searches . before other directories, *and* there is a file in
/etc/init.d or ~ that causes different behavior.

(hint, make sure . is last in your PATH, if it's there at all.  Security
breach can exploit a misplaced PATH . )

> -----Original Message-----
> From: centos-bounces at centos.org 
> [mailto:centos-bounces at centos.org] On Behalf Of Whit Blauvelt
> Sent: Tuesday, May 25, 2010 6:18 PM
> To: CentOS mailing list
> Subject: Re: [CentOS] Odd failure of smbd to start from 
> init.d - CentOS 5.4
> 
> On Tue, May 25, 2010 at 06:09:40PM -0400, Whit Blauvelt wrote:
> 
> > Correction: that wasn't a virgin version of Cent's. More in 
> a moment.
> 
> This gets more bizarre. To a virgin version of Cent's 
> /etc/init.d/smb - it's a perfect match:
> 
>  # diff ./smb /etc/init.d/smb
>  # 
> 
> That's right, no diff!
> 
> Yet if I run ./smb - the Redhat version, identical but for 
> where it sits, it starts smbd with no problem. But 
> /etc/init.d/smb of course still fails. Both are rwxr-xr-x 1 
> root root. So: same file contents, same file permissions and 
> ownership, same invocation, and the one in /etc/init.d fails.
> 
> On two different CentOS systems.
> 
> WTF?
> 
> Whit
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
*******************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed. If you have received this email in error please
notify the system manager. This footnote also confirms that this
email message has been swept for the presence of computer viruses.
www.Hubbell.com - Hubbell Incorporated**




More information about the CentOS mailing list