[Bug 875440] Re: Cannot authenticate with saslauthd and mysql

2012-10-14 Thread Monkberry
Solved-Works
I really hope this helps some people on here but I've found a solution that 
does NOT require uninstalling packages or installing anything that's not in the 
stock repos for precise 12.04 for use in saslauthd(cyrus), mysql, postfix 
scenario.
The gist of the problem seems to be syntax changes and the fact that if used in 
postfix (with chroot environment), a missing link in /var/run to the chroot of 
/var/spool/postfix/var/run/saslauthd.

If postfix is chrooted (and it probably is)
/etc/default/saslauthd
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
(needed the -r option, that puts the name and domain together, short for realm, 
without that it will send the user as "george" not "geo...@example.org"

/etc/pam.d/smtp
auth required pam_mysql.so user=mail passwd=yourdbpassword host=127.0.0.1 
db=maildb table=users usercolumn=id passwdcolumn=clear crypt=0
account sufficient pam_mysql.so user=mail passwd=yourdbpassword host=127.0.0.1 
db=maildb table=users usercolumn=id passwdcolumn=clear crypt=0
(this file needed the appropriate references to the database and table names 
and since I used clear passwords, I needed to change crypt=1 to crypt=0. (and 
the passwdcolumn from crypt to clear) I did this so the clear passwords would 
read all the password. Using crypt in the mysql table, it would only recognize 
the first 8 characters and ignore the rest.

And here's where the real changes took place, in the syntax.
/etc/postfix/sasl/smtpd.conf file need the changed syntax (alot) and relevant 
sql query info. NOTE: I did NOT need the "pam" mech_list option that I thought 
before.
pwcheck_method: saslauthd
mech_list: plain login cram-md5 digest-md5
log_level: 7 #Remove this line when done
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: mail
sql_passwd: yourdbpasswd
sql_database: maildb
sql_select: select clear from users where id='%u@%r' and enabled = 1
(note the use of the field "clear", you probably want "crypt" if using flurdy's 
how-to.

/etc/postfix/master.cf
submission inet n   -   -   -   -   smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

/etc/postfix/main.cf
# SASL 
smtpd_sasl_auth_enable = yes
# If your potential clients use Outlook Express or other older clients 
# this needs to be set to yes 
broken_sasl_auth_clients = no
smtpd_sasl_security_options = noanonymous
# also add
# Add permit_sasl_authenticated to you existing smtpd_sender_restrictions
# Add permit_sasl_authenticated to you existing smtpd_recipient_restrictions

Fixed the sasl path problem by writing a script as such to run at boot
as I didn't want to try and figure out what the hell the deal was with
the path, how it starts, what starts it, what names it, sasl is a pain
in the ass!

#!/bin/bash
sleep 5
ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthd
/etc/init.d/saslauthd restart
/etc/init.d/postfix restart

That did it!!
Finally got port 587 working and authenticating.
Don't forget to open the port if not already done on the firewall

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/875440

Title:
  Cannot authenticate with saslauthd and mysql

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cyrus-sasl2/+bug/875440/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 840696] Re: vino-server crashed with SIGSEGV in free()

2012-01-19 Thread Monkberry
WORKAROUND

Apparently this is a timing problem, cart before the horse so to speak.
As seen above the suggestions about starting/stopping/enabling/disabling
networks and/or desktop sharing, I figured the problem was probably due
to the fact that the desktop sharing was enabling BEFORE the network was
actually ready, thereby killing the process when the network then became
ready. This may or not be but creating a simple script that fires up the
vino-server after waiting for 10 seconds after login solves the problem.
I created this and added it to my startup applicaitions.

#!/bin/bash
sleep 10
/usr/lib/vino/vino-server

Now all is well. This was on Linux Mint 12 using the MATE desktop.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/840696

Title:
  vino-server crashed with SIGSEGV in free()

To manage notifications about this bug go to:
https://bugs.launchpad.net/vino/+bug/840696/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs