Retrieve email address from text using grep
grep -Eoh ‘[A-Za-z0-9\-\.\_]+@[A-Za-z0-9\-\_]+\.[A-Za-z0-9\-\.\_]+’ filename
grep -Eoh ‘[A-Za-z0-9\-\.\_]+@[A-Za-z0-9\-\_]+\.[A-Za-z0-9\-\.\_]+’ filename
For IMAP and POP3 authentication, all you have to do is change the “Format for usernames that include domain” in:
Virtualmin > System Settings > Server Templates > Default Settings > Mail for Domain
to be “user@domain”.
However, Cyrus SASL, which is what handles the SMTP authentication, requires a special flag on it to handle user@domain usernames, a -r in the settings. The magical file you need to edit is /etc/sysconfig/saslauthd. At the bottom you will see the following:
Additional flags to pass to saslauthd on the command line.
See saslauthd(8) for the list of accepted flags. FLAGS=-r
Just make your FLAGS= like mine does. This will pass the -r to the sasl authentication daemon, and your user@domain authentication will work!
Let me know if you have any other questions.
Originally found at : http://blog.molski.nl/2009/10/07/virtualmin-and-userdomain-pop3smtp-login-style/
If you’re playing with the excellent new ChrootDirectory and internal-sftp options in recent OpenSSH releases (such as 5.1 which is in Ubuntu 8.10 Intrepid), you may have hit an error like:
fatal: bad ownership or modes for chroot directory
You may also have searched on Google for what to do about it and come away with very little useful information.
Well no more! I did the same thing and got bored of reading mailing list posts, so read the source code instead. The relevant section is in session.c:
if (stat(component, &st) != 0)
fatal(“%s: stat(\”%s\”): %s”, __func__,
component, strerror(errno));
if (st.st_uid != 0 || (st.st_mode & 022) != 0)
fatal(“bad ownership or modes for chroot ”
“directory %s\”%s\”",
cp == NULL ? “” : “component “, component);
This is quite simple really, it’s stat()ing the directory specified for “ChrootDirectory” and all its parents up to / and checking that they are:
owned by root
not group or other writable
(it also checks they are actually directories, but I’m going to assume you’re not stupid enough to try and chroot into a file )
Note my emphesis that these checks apply to the chroot directory itself and its parents and /, so if you are chrooting users into /srv/chroot/ then you need to ensure that /, /srv and /srv/chroot are owned by root and not writable by the group (even if it’s root, bizarrely) or other users.
Adopted from : http://www.tenshu.net/archives/2008/10/09/openssh-51-chrootdirectory-permissions-issue/
/etc/suphp.conf
/etc/httpd/conf.d/su.php
Usege example
root at server1:/root/suPHP/suphp-0.6.3/src# diff -u ./Application.cpp
./Application.cpp-dist
— ./Application.cpp 2008-04-24 15:21:20.000000000 -0700
+++ ./Application.cpp-dist 2008-03-30 04:43:38.000000000 -0700
@@ -492,14 +492,12 @@
directory = directory.getParentDirectory();
UserInfo directoryOwner = directory.getUser();
-#ifndef OPT_USERGROUP_OWNER
if (directoryOwner != owner && !directoryOwner.isSuperUser()) {
std::string error = “Directory ” + directory.getPath()
+ ” is not owned by ” + owner.getUsername();
logger.logWarning(error);
throw SoftException(error, __FILE__, __LINE__);
}
-#endif
if (!directory.isSymlink()
&& !config.getAllowDirectoryGroupWriteable()
Originally found at https://lists.marsching.com/pipermail/suphp/2008-April/001831.html
Make key file
Generating RSA private key, 1024 bit long modulus
…………..++++++
..++++++
e is 65537 (0×10001)
Enter pass phrase for example.com.key:
Verifying – Enter pass phrase for example.com.key:
# openssl req -new -key example.com.key -out example.com.csr
Enter pass phrase for example.com.key:
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:
Email Address []:
A challenge password []:
An optional company name []:
Get CRT (GeoTrust, verisign etc)
Remove pass phrase
edit /etc/postfix/main.cf
edit /etc/dovecot.conf
ssl_cert_file = /etc/pki/tls/certs/example.com.crt
ssl_key_file = /etc/pki/tls/certs/example.com.pem
restart postfix and dovecot
as you might know, yum does not provide re-install functionality,
for re-installing yum installed application following methods may useful
update-rc.d foo defaults
you also need script be executable
chmod +x foo
$ sudo dpkg -i webmin_1.420_all.deb
$ sudo apt-get -f install
ns2 ~ # /usr/bin/gdm
/usr/bin/gdm: error while loading shared libraries: libdirectfb-0.9.so.25: cannot open shared object file: No such file or directory
Revdep-rebuild should find out the problem for you, the most obvious reason whyit might not is if a previous run of revdep-rebuild did not complete and thetemporary files were still present. Please try running “revdep-rebuild -i” toensure that the temporary files are cleaned out. If you do this before trying to re-emerge totem-pl-parser, you can test whether it spots, it and then againwhether totem-pl-parser fixes the problem.
If after you’ve got the results the problem hasn’t been fixed, orrevdep-rebuild wasn’t correctly finding the issue, then please feel free to reopen this bug… 5:)