From owner-freebsd-questions@FreeBSD.ORG Mon Mar 28 21:49:47 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D705E16A4CE for ; Mon, 28 Mar 2005 21:49:47 +0000 (GMT) Received: from web50110.mail.yahoo.com (web50110.mail.yahoo.com [206.190.38.38]) by mx1.FreeBSD.org (Postfix) with SMTP id 28FEE43D2F for ; Mon, 28 Mar 2005 21:49:47 +0000 (GMT) (envelope-from jhnpublic@yahoo.com) Received: (qmail 5094 invoked by uid 60001); 28 Mar 2005 21:49:46 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=bLy4Z1H0xxcd2ymxufsFNRU74uFqwSyWGA41wQZ9oGIpq3arg6IafMHJvn9k7ExZRH98gaY+tUosM2Z7E0xso1fzef5bmkhe8kqMAwEjuz4dN42QdWJT/sshcd7FS5iuAEgvvneNv2RjNyGTIsTq78BFCD14VgZm3+cX5wtSKp0= ; Message-ID: <20050328214946.5092.qmail@web50110.mail.yahoo.com> Received: from [164.64.118.112] by web50110.mail.yahoo.com via HTTP; Mon, 28 Mar 2005 13:49:46 PST Date: Mon, 28 Mar 2005 13:49:46 -0800 (PST) From: John Public To: Jeff Wirth In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: su command problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 21:49:48 -0000 I'm apologize for being unclear. Let me try again. I have not modified the mysql-server.sh script in any way. The 'su -m mysql -c date' line is merely an example of what I used to see if 'su' is having a problem. All that line does is run the 'date' command as the mysql user. I used this for testing between the 5.3 system and the 5.2.1 system to see if there was a difference. Indeed there was a difference. On the 5.2.1 system the command ran 'date' w/o any problem and then returned control to the root shell, but on the 5.3 system, it su'ed me to the mysql account, but did not execute the 'date' command and stayed w/ the mysql account. This is how I have come to the conclusion that it has something to do w/ the su command or security relating to it, rather than the scripts which are used to run mysql or nagios. I guess I'm trying to determine if this is a bug in the 'su' command or if there is a security setting somewhere in 5.3 which changes the behavior of 'su'. Thanks again for your attention. John --- Jeff Wirth wrote: > >On Mon, 28 Mar 2005 11:03:23 -0800 (PST), John > Public > wrote: > > > Thanks for your quick reply. In answer to your > query, > > NP > > > yes, I installed mysql 4.1 from ports, and it > works > > just fine if I start it using mysqld_safe. > However, > > if I attempt to run it from > > /usr/local/etc/rc.d/mysql-server.sh, the same > behavior > > occurs. My reasoning for thinking it is a problem > w/ > > the su command is as follows: > > > > su -m mysql -c date > > first, I don't think the 'mysql' binary even has a > '-c' option. > > If I'm following you here, you modify the default > startup script > (/usr/local/etc/rc.d/mysql-server.sh) to run `su -m > mysql -c date`. > Instead of the default (w/flags): > > /usr/local/bin/mysqld_safe --user=${mysql_user} > --datadir=${mysql_dbdir} > --bind-address=${bind_address} > --pid-file=${pidfile} > /dev/null & > > why? > > > When I got to digging around in the rc system > while I > > was having the same problem w/ nagios, I > discovered > > that it is using the su command. Hope this makes > > sense. Once again, thanks for your input and any > > further insight would be appreciated. > > I would take a look at the default mysql startup > script and compare it > to what you currently have in place. > (/path/to/ports/database/mysql41-server/files/mysql-server.sh) > > -jw > __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250