[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new debian user question about mysql on debian



On Tue, Jul 03, 2007 at 03:35:56PM +0100, Jaime Ventura wrote:
> Hello
>    I've install mysql on a etch box e I've noticed a debian-sys-maint user.

See /usr/share/doc/mysql-server-5.0/README.Debian.gz - it's 
automagically created to help the init scripts and the like.

>    Shouldnt this user  have grant privileges?

Not necessarilty..

>    Aparently it does:
> 
> 
> mysql> select Grant_priv  from user where User="debian-sys-maint";
> +------------+
> | Grant_priv |
> +------------+
> | Y          |
> +------------+
> 1 row in set (0.00 sec)

The other columns are interesting too. But unless you have changed them 
yourself, they should be set up according to 
/var/lib/dpkg/info/mysql-server-5.0.postinst

> But when i do the following with that user(after login with the right 
> credentials):
> 
> webserver:~/vhcs-2.4.7.1# mysql -u debian-sys-maint -p
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 53
> Server version: 5.0.32-Debian_7etch1-log Debian etch distribution
> 
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> 
> mysql> grant all on *.* to 'vhcs2'@'localhost' identified by 'teste' 
> with grant option;
> ERROR 1045 (28000): Access denied for user 
> 'debian-sys-maint'@'localhost' (using password: YES)

The 'all' privilege probably exceeds the privileges that 
debian-sys-maint actually possess. MySQL only allows users to grant 
privileges to others that they possess themselves..

I think you're mis-using debian-sys-maint. It appears to be created to 
help the init scripts and (possibly) packaging. Why not use the 
(standard) 'root' account?

-- 
Karl E. Jorgensen
karl@jorgensen.org.uk  http://www.jorgensen.org.uk/
karl@jorgensen.com     http://karl.jorgensen.com
==== Today's fortune:
Here comes the orator, with his flood of words and his drop of reason.

Attachment: signature.asc
Description: Digital signature


Reply to: