[rt-users] LDAP and auto create users

Neil Marjoram n.marjoram at adastral.ucl.ac.uk
Wed Mar 15 08:58:55 EST 2006


Can anyone help me? I need to be able to auto create users on 
submission. I already have the LDAP working correctly for registered 
users, but when a non registered user sends an email I get :

RT could not load a valid user, and RT's configuration does not allow
for the creation of a new user for this email blah.

You might need to grant 'Everyone' the right 'CreateTicket' for the
queue general.


I have granted Everyone create ticket for general, but this does not 
seem to work, I have replaced the User_Local.pm with that from the LDAP 
wiki, and configured the RT_SiteConfig.pm (which seems to work as I can 
login OK)

I have listed the log outout and the RT_SiteConfig below. I use RHEL 4 
and RT 3.4.5.

Many thanks,

Neil.

Output from rt.log with debug set.
[Wed Mar 15 13:15:04 2006] [debug]: Guessed encoding: ascii 
(/usr/local/rt/lib/RT/I18N.pm:396)
[Wed Mar 15 13:15:04 2006] [debug]: Guessed encoding: ascii 
(/usr/local/rt/lib/RT/I18N.pm:396)
[Wed Mar 15 13:15:04 2006] [debug]: Converting 'ascii' to 'utf-8' for 
text/plain - test3
 (/usr/local/rt/lib/RT/I18N.pm:226)
[Wed Mar 15 13:15:04 2006] [debug]: RT::User::CanonicalizeEmailAddress : 
called with "user at example.uk" by RT::CurrentUser 
/usr/local/rt/lib/RT/CurrentUser.pm 217 
(/usr/local/rt/lib/RT/User_Local.pm:314)
[Wed Mar 15 13:15:04 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter 
"mail=user at example.uk" by RT::User /usr/local/rt/lib/RT/User_Local.pm 
318 (/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:04 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk mail=user at example.uk =>  EmailAddress: , 
Name: , RealName:  (/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:04 2006] [info]: RT::User::CanonicalizeEmailAddress 
user at example.uk =>  user at example.uk (/usr/local/rt/lib/RT/User_Local.pm:326)
[Wed Mar 15 13:15:04 2006] [debug]: RT::User::CanonicalizeUserInfo  
called by RT::User /usr/local/rt/lib/RT/User_Overlay.pm 191 with: 
Comments: Autocreated on ticket submission, Disabled: 0, EmailAddress: 
user at example.uk, Name: user at example.uk, Password: user at example.uk, 
Privileged: 1, RealName: Neil Marjoram 
(/usr/local/rt/lib/RT/User_Local.pm:359)
[Wed Mar 15 13:15:04 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter 
"uid=user at example.uk" by RT::User /usr/local/rt/lib/RT/User_Local.pm 374 
(/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:04 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk uid=user at example.uk =>  EmailAddress: , Name: 
, RealName:  (/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:04 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter 
"mail=user at example.uk" by RT::User /usr/local/rt/lib/RT/User_Local.pm 
374 (/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:04 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk mail=user at example.uk =>  EmailAddress: , 
Name: , RealName:  (/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:04 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter "cn=Neil 
Marjoram" by RT::User /usr/local/rt/lib/RT/User_Local.pm 374 
(/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk cn=Neil Marjoram =>  EmailAddress: 
n.marjoram at adastral.ucl.ac.uk, ExternalAuthId: username, Gecos: 
username, Name: username, RealName: Neil Marjoram 
(/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:05 2006] [debug]: RT::User::CanonicalizeEmailAddress : 
called with "n.marjoram at adastral.ucl.ac.uk" by RT::User 
/usr/local/rt/lib/RT/User_Local.pm 383 
(/usr/local/rt/lib/RT/User_Local.pm:314)
[Wed Mar 15 13:15:05 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter 
"mail=n.marjoram at adastral.ucl.ac.uk" by RT::User 
/usr/local/rt/lib/RT/User_Local.pm 318 
(/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk mail=n.marjoram at adastral.ucl.ac.uk =>  
EmailAddress: n.marjoram at adastral.ucl.ac.uk, ExternalAuthId: username, 
Gecos: username, Name: username, RealName: Neil Marjoram 
(/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::CanonicalizeEmailAddress 
n.marjoram at adastral.ucl.ac.uk =>  n.marjoram at adastral.ucl.ac.uk 
(/usr/local/rt/lib/RT/User_Local.pm:326)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::CanonicalizeUserInfo 
returning Comments: Autocreated on ticket submission, Disabled: 0, 
EmailAddress: n.marjoram at adastral.ucl.ac.uk, ExternalAuthId: username, 
Gecos: username, Name: username, Password: user at example.uk, Privileged: 
1, RealName: Neil Marjoram (/usr/local/rt/lib/RT/User_Local.pm:392)
[Wed Mar 15 13:15:05 2006] [debug]: RT::User::CanonicalizeEmailAddress : 
called with "n.marjoram at adastral.ucl.ac.uk" by RT::User 
/usr/local/rt/lib/RT/User_Overlay.pm 195 
(/usr/local/rt/lib/RT/User_Local.pm:314)
[Wed Mar 15 13:15:05 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter 
"mail=n.marjoram at adastral.ucl.ac.uk" by RT::User 
/usr/local/rt/lib/RT/User_Local.pm 318 
(/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk mail=n.marjoram at adastral.ucl.ac.uk =>  
EmailAddress: n.marjoram at adastral.ucl.ac.uk, ExternalAuthId: username, 
Gecos: username, Name: username, RealName: Neil Marjoram 
(/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::CanonicalizeEmailAddress 
n.marjoram at adastral.ucl.ac.uk =>  n.marjoram at adastral.ucl.ac.uk 
(/usr/local/rt/lib/RT/User_Local.pm:326)
[Wed Mar 15 13:15:05 2006] [debug]: RT::User::CanonicalizeEmailAddress : 
called with "user at example.uk" by RT::User 
/usr/local/rt/lib/RT/User_Overlay.pm 562 
(/usr/local/rt/lib/RT/User_Local.pm:314)
[Wed Mar 15 13:15:05 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter 
"mail=user at example.uk" by RT::User /usr/local/rt/lib/RT/User_Local.pm 
318 (/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk mail=user at example.uk =>  EmailAddress: , 
Name: , RealName:  (/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:05 2006] [info]: RT::User::CanonicalizeEmailAddress 
user at example.uk =>  user at example.uk (/usr/local/rt/lib/RT/User_Local.pm:326)
[Wed Mar 15 13:15:05 2006] [crit]: User creation failed in mailgateway: 
Name in use (/usr/local/rt/lib/RT/Interface/Email.pm:302)
[Wed Mar 15 13:15:06 2006] [debug]: RT::User::CanonicalizeEmailAddress : 
called with "user at example.uk" by RT::CurrentUser 
/usr/local/rt/lib/RT/CurrentUser.pm 217 
(/usr/local/rt/lib/RT/User_Local.pm:314)
[Wed Mar 15 13:15:06 2006] [debug]: RT::User::LookupExternalUserInfo 
called with baseDN "ou=People,dc=example,dc=uk" and filter 
"mail=user at example.uk" by RT::User /usr/local/rt/lib/RT/User_Local.pm 
318 (/usr/local/rt/lib/RT/User_Local.pm:441)
[Wed Mar 15 13:15:06 2006] [info]: RT::User::LookupExternalUserInfo : 
ou=People,dc=example,dc=uk mail=user at example.uk =>  EmailAddress: , 
Name: , RealName:  (/usr/local/rt/lib/RT/User_Local.pm:516)
[Wed Mar 15 13:15:06 2006] [info]: RT::User::CanonicalizeEmailAddress 
user at example.uk =>  user at example.uk (/usr/local/rt/lib/RT/User_Local.pm:326)
[Wed Mar 15 13:15:06 2006] [warning]: Couldn't load user 
'user at example.uk'.giving up (/usr/local/rt/lib/RT/Interface/Email.pm:317)
[Wed Mar 15 13:15:06 2006] [crit]: User  'user at example.uk' could not be 
loaded in the mail gateway (/usr/local/rt/lib/RT/Interface/Email.pm:318)
[Wed Mar 15 13:15:06 2006] [error]: RT could not load a valid user, and 
RT's configuration does not allow
for the creation of a new user for this email (user at example.uk).

You might need to grant 'Everyone' the right 'CreateTicket' for the
queue general.

RT_SiteConfig.pm

Set( $rtname, 'rt.example.uk');
Set($Organization , "example.uk");
Set($Timezone , 'Europe/London');
Set($WebBaseURL , "http://rt.example.uk:80");
Set($WebPath , "");
  Set($DatabaseUser , "rt_user");
  Set($DatabasePassword , "PASSWORD");
Set  ($LdapUidAttr="uid");
Set($LdapNameAttr, "cn");
Set($LdapMailAttr, "mail");
Set($LdapFilter, "(objectclass=posixAccount)");
Set($AutoCreateFromExternalUserInfo, 1);

# $LdapFilter="(objectclass=*)";
# $LdapTLS = 1;
Set($AuthMethods, ['LDAP', 'Internal']);
Set($LdapExternalAuth, 1);
Set($LdapExternalInfo, 1);
Set ($LDAPExternalAuto, 1);
$LDAPExternalAuto = 1;
Set($LdapAttrMap, {'Name' => 'uid',
                   'EmailAddress' => 'mail',
                   'RealName' => 'cn',
                   'ExternalAuthId' => 'uid',
                   'Gecos' => 'uid'}
);

# A list of RT attrs which can uniquely identify a user,
# ordered from most to least preferred.
Set($LdapRTAttrMatchList, ['Name', 'EmailAddress', 'RealName']
);

# A list of LDAP attrs to examine when canonicalizing email addresses,
# ordered from most to least preferred
Set($LdapEmailAttrMatchList, ['mail']
);

# The basics; if set, these override $RT::LdapAuth* and $RT::LdapInfo*
Set($LdapServer, 'ldap1.example.uk');
Set($LdapBase, 'ou=People,dc=example,dc=uk');
Set($LdapFilter, "(objectclass=posixAccount)");
Set($LdapUser, 'cn=ldap,ou=DSA,dc=example,dc=uk');
Set($LdapPass, 'PASSWORD');

Set($LogToFile      , debug);
Set($LogDir, '/usr/local/rt/var/log');
Set($LogToFileNamed , "rt.log");

-- 
Neil Marjoram
Systems Manager
Adastral Park Campus
University College London
Ross Building
Adastral Park
Martlesham Heath
Ipswich - Suffolk
IP5 3RE

Tel: 01473 663711
Fax: 01473 635199


Reclaim Your Inbox!
http://www.mozilla.org/products/thunderbird




More information about the rt-users mailing list