Hi all, I would like to log the user acces with something like: root preexec = echo "INSERT INTO logins (user, host, ip, date, time) VALUES ('%u', '%m', '%I', CURDATE(), CURTIME() );" | /usr/bin/mysql -u root sambaLogins Alas this doesn't work, I get nothing logged. I write this statement to /tmp/logons with: root preexec = echo "insert into logins (user, host, ip, date, time) values ('%u', '%m', '%I', CURDATE(), CURTIME() );" >> /tmp/logons In /tmp/logons I see lines saying e.g.: insert into logins (user, host, ip, date, time) values ('wer', 'kiebitz', '172.18.14.22', CURDATE(), CURTIME() ); When I cut and paste this as user root, it works. Has anybody an Idea, what i do wrong? Or an working example? Thanks, Malte Mueller