From: Peter Palfrader Date: Thu, 29 Oct 2015 09:25:12 +0000 (+0100) Subject: ud-useradd: try to send the proper template X-Git-Tag: userdir-ldap-0.3.88~21 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=823ee0d7c48109648bd0f54769bb551ed1aede29 ud-useradd: try to send the proper template --- diff --git a/templates/welcome-message-60000 b/templates/welcome-message-60000 deleted file mode 100644 index 1bff99d..0000000 --- a/templates/welcome-message-60000 +++ /dev/null @@ -1,52 +0,0 @@ -To: "__ENCODED_REALNAME__" <__EMAIL__> -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit -Subject: Debian Guest Account for __ENCODED_REALNAME__ -Cc: debian-admin@lists.debian.org -Reply-To: debian-admin@lists.debian.org -Date: __DATE__ -User-Agent: Script run by __WHOAMI__ - -Dear __REALNAME__! - -An account has been created for you on the Debian machine cluster. You can -use this account to help make software run properly on the Debian -distribution. The username for this account is '__LOGIN__'. - -See for a list of machines that are -available. The list of which machines you can access is user-dependent. -To find out which machines you have access to try running - ldapsearch -LLL -b dc=debian,dc=org -x -h db.debian.org \ - uid=__LOGIN__ allowedHost - -On porter machines, the chroot environments can be entered with the -'schroot' command, depending on setup; take a look at the list of -machines to know which are our porterboxes. You can install build -dependencies yourself once you instantiated a session. Please -consult for more information -and ask your mentors if you need any help. - -You should use ssh to log into the machines. See the host details on -db.debian.org for the ssh hostkey fingerprints for the servers you -access. Our LDAP directory is able to share ssh RSA keys among -machines, please see for -general documentation and for how to add ssh keys to the LDAP. Please be -aware of the security implications of using RSA authentication and ssh -agents. - -Your password to access db.debian.org can be found encrypted with your -PGP key and appended to this message. It cannot be used to log into -our machines; see the paragraph on SSH keys above. - -After a short while this account will be expired, please contact DSA -if you need it for longer or wish to re-activate your account once -expired. This account is only to be used to help porting/improving free -software. - -Please note while technically there might be __LOGIN__@debian.org address -associated with this account we very much expect you to not use it. Thanks. --- -Debian Administration - -__PASSWORD__ diff --git a/templates/welcome-message-800 b/templates/welcome-message-800 deleted file mode 100644 index db80105..0000000 --- a/templates/welcome-message-800 +++ /dev/null @@ -1,154 +0,0 @@ -To: "__ENCODED_REALNAME__" <__EMAIL__> -From: __WHOAMI__ -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit -Subject: New Debian developer __ENCODED_REALNAME__ -Cc: nm@debian.org, debian-admin@debian.org -Reply-To: nm@debian.org -Date: __DATE__ -User-Agent: nm-create script run by __WHOAMI__ - -[ This is a long mail with important information, so please read it all - carefully. ] - -Dear __REALNAME__! - -Your account '__LOGIN__' has just been created in the central LDAP -database of the Debian project. Please note that it needs a bit of time -until this information is synced with all developer-accessible machines. -You should be able to login into debian.org machines after about 30-60 -minutes. If you applied for Debian Developer with uploading rights, -you should be able to upload packages already. - -Email sent to <__LOGIN__@debian.org> will be forwarded to <__EMAIL__>, -to change this visit . -The Debian mail setup allows various per-user settings, like enabling -greylisting, sender-verify-callouts and per-user dns blocklists. -Please refer to on how to change -these settings. Some may also be exposed via the web interface behind -. - -Your password to access db.debian.org can be found encrypted with your -PGP key and appended to this message. It cannot be used to log into -our machines; see the paragraph on SSH keys below. - -You now have access to various project machines, for a list of them take -a look at . -Please remember that you accepted the Debian Machine Usage Policy in -your NM process (available at ). - -If you need additional software installed on one of the machines (in the -host system) please contact debian-admin@lists.debian.org, but keep in -mind that not all software is available on all architectures. - -On porter machines, the chroot environments can be entered with the -'schroot' command, depending on setup; take a look at the list of -machines to know which are our porterboxes. You can install build -dependencies yourself once you instantiated a session. Please -consult for more information -and ask your fellow DDs if you need any help. - -You need to use ssh to log into the machines; telnet and rlogin are -disabled for security reasons. On debian.org servers the only ssh -authentication method available is publickey. The LDAP directory is -able to share RSA ssh keys among machines, please see -. Please be aware of the -security implications of using RSA authentication and ssh agents. The -SSH fingerprints for all Debian machines can be looked up at - or a known_hosts file can be -downloaded from . - -Debian secures some of its websites using SSL. The SSL certificates -used are signed by a current commercial certificate authority. - -To give you a quick overview here is a list of the most important -machines from the project you can access. There is the main archive -server, but shell access to it is restricted for security reasons, so you -can only upload with anonymous FTP - please use the service name -ftp.upload.debian.org as the target for your uploads (so that we can -point that some place else when the archive system is down for -maintenance etc.). A tool like dput or dupload can aid this -process. - -The project main shell server is located at people.debian.org. -If you want your own Debian related site to appear behind - then put it on this -machine in the directory ~/public_html/. - -The machine hosting most of our VCS repositories -({svn,bzr,git,arch,hg}.debian.org) is alioth.debian.org. It's handled -by a separate team (admin@alioth.debian.org) as it allows login by -non-Debian developers. You probably already have a *-guest account -there. Please refer to https://wiki.debian.org/AliothFAQ to learn -anything you need to know, including how to activate your account and -how to request the removal of your old -guest account. - -There is one developer-only mailing list, debian-private. You have been -subscribed to this list as <__PRIVATE__>, please respect the privacy of -this list and don't forward mail from it elsewhere. This subscription, and -a lot of other data like your private information, can be changed at the -web interface available behind ; just login -with the password information appended to this email. - -The information stored here is used to maintain your accounts on various -Debian machines, and also to allow other developers and general users to -find out more about you. Many of the fields are only visible to other -registered Debian developers. This is also the only way to change your -password. The passwd program does not work. - -You can refer to https://wiki.debian.org/MigrateToDDAccount to find -additional notes to help you migrate your previous information to your -new account. - -Before we go on with other important information let's remember the most -important documents from the NM process. That you now got your account -doesn't mean to stop reading and checking them whenever you do packaging -or other Debian related work. - - o The Debian Social Contract - - - o The Debian Policy Manual - - - o The Debian Developer's reference - - -You can find much more information useful to developers at -. - -Also, please subscribe to the mailing list debian-devel-announce, if you -haven't done so already. All Debian developers are required to read -this list, as important announcements are made there. Changes to -Debian's infrastructure and maintenance of it are announced to the -debian-infrastructure-announce mailing list. - -We strongly suggest that you use your __LOGIN__@debian.org address for -the maintainer field in your packages, because that one will be valid -as long as you are a Debian developer, even if you change jobs, leave -university or change Internet Service providers. If you do so, please -add that address to your PGP/GPG key(s) (using `gpg --edit-key "YOUR -USER ID"') and send it to the keyring server at keyring.debian.org -with `gpg --keyserver keyring.debian.org --send-keys "YOUR USER ID"'. - -We suggest that you subscribe to debian-mentors@lists.debian.org. -This list is for new maintainers who seek help with initial packaging -and other developer-related issues. Those who prefer one-on-one help -can also post to the list, and an experienced developer may volunteer -to help you. You can get online help on IRC, too, if you join the -channel #debian-devel or #debian-mentors on irc.debian.org. Take a look -at the support section on in order to find -out more information. - -If you have some spare time and want to contribute it to Debian you -may wish to take a look at the "Work-Needing and Prospective Packages", -(WNPP) that can be found at . - -Welcome to the project! - --- -Debian System Administrators on behalf of -The Debian New Maintainer Team - -__PASSWORD__ diff --git a/templates/welcome-message-Debian b/templates/welcome-message-Debian new file mode 100644 index 0000000..1f614b6 --- /dev/null +++ b/templates/welcome-message-Debian @@ -0,0 +1,154 @@ +To: "__ENCODED_REALNAME__" <__EMAIL__> +From: __WHOAMI__ +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit +Subject: New Debian developer __ENCODED_REALNAME__ +Cc: nm@debian.org, debian-admin@debian.org +Reply-To: nm@debian.org +Date: __DATE__ +User-Agent: ud-useradd script run by __WHOAMI__ + +[ This is a long mail with important information, so please read it all + carefully. ] + +Dear __REALNAME__! + +Your account '__LOGIN__' has just been created in the central LDAP +database of the Debian project. Please note that it needs a bit of time +until this information is synced with all developer-accessible machines. +You should be able to login into debian.org machines after about 30-60 +minutes. If you applied for Debian Developer with uploading rights, +you should be able to upload packages already. + +Email sent to <__LOGIN__@debian.org> will be forwarded to <__EMAIL__>, +to change this visit . +The Debian mail setup allows various per-user settings, like enabling +greylisting, sender-verify-callouts and per-user dns blocklists. +Please refer to on how to change +these settings. Some may also be exposed via the web interface behind +. + +Your password to access db.debian.org can be found encrypted with your +PGP key and appended to this message. It cannot be used to log into +our machines; see the paragraph on SSH keys below. + +You now have access to various project machines, for a list of them take +a look at . +Please remember that you accepted the Debian Machine Usage Policy in +your NM process (available at ). + +If you need additional software installed on one of the machines (in the +host system) please contact debian-admin@lists.debian.org, but keep in +mind that not all software is available on all architectures. + +On porter machines, the chroot environments can be entered with the +'schroot' command, depending on setup; take a look at the list of +machines to know which are our porterboxes. You can install build +dependencies yourself once you instantiated a session. Please +consult for more information +and ask your fellow DDs if you need any help. + +You need to use ssh to log into the machines; telnet and rlogin are +disabled for security reasons. On debian.org servers the only ssh +authentication method available is publickey. The LDAP directory is +able to share RSA ssh keys among machines, please see +. Please be aware of the +security implications of using RSA authentication and ssh agents. The +SSH fingerprints for all Debian machines can be looked up at + or a known_hosts file can be +downloaded from . + +Debian secures some of its websites using SSL. The SSL certificates +used are signed by a current commercial certificate authority. + +To give you a quick overview here is a list of the most important +machines from the project you can access. There is the main archive +server, but shell access to it is restricted for security reasons, so you +can only upload with anonymous FTP - please use the service name +ftp.upload.debian.org as the target for your uploads (so that we can +point that some place else when the archive system is down for +maintenance etc.). A tool like dput or dupload can aid this +process. + +The project main shell server is located at people.debian.org. +If you want your own Debian related site to appear behind + then put it on this +machine in the directory ~/public_html/. + +The machine hosting most of our VCS repositories +({svn,bzr,git,arch,hg}.debian.org) is alioth.debian.org. It's handled +by a separate team (admin@alioth.debian.org) as it allows login by +non-Debian developers. You probably already have a *-guest account +there. Please refer to https://wiki.debian.org/AliothFAQ to learn +anything you need to know, including how to activate your account and +how to request the removal of your old -guest account. + +There is one developer-only mailing list, debian-private. You have been +subscribed to this list as <__PRIVATE__>, please respect the privacy of +this list and don't forward mail from it elsewhere. This subscription, and +a lot of other data like your private information, can be changed at the +web interface available behind ; just login +with the password information appended to this email. + +The information stored here is used to maintain your accounts on various +Debian machines, and also to allow other developers and general users to +find out more about you. Many of the fields are only visible to other +registered Debian developers. This is also the only way to change your +password. The passwd program does not work. + +You can refer to https://wiki.debian.org/MigrateToDDAccount to find +additional notes to help you migrate your previous information to your +new account. + +Before we go on with other important information let's remember the most +important documents from the NM process. That you now got your account +doesn't mean to stop reading and checking them whenever you do packaging +or other Debian related work. + + o The Debian Social Contract + + + o The Debian Policy Manual + + + o The Debian Developer's reference + + +You can find much more information useful to developers at +. + +Also, please subscribe to the mailing list debian-devel-announce, if you +haven't done so already. All Debian developers are required to read +this list, as important announcements are made there. Changes to +Debian's infrastructure and maintenance of it are announced to the +debian-infrastructure-announce mailing list. + +We strongly suggest that you use your __LOGIN__@debian.org address for +the maintainer field in your packages, because that one will be valid +as long as you are a Debian developer, even if you change jobs, leave +university or change Internet Service providers. If you do so, please +add that address to your PGP/GPG key(s) (using `gpg --edit-key "YOUR +USER ID"') and send it to the keyring server at keyring.debian.org +with `gpg --keyserver keyring.debian.org --send-keys "YOUR USER ID"'. + +We suggest that you subscribe to debian-mentors@lists.debian.org. +This list is for new maintainers who seek help with initial packaging +and other developer-related issues. Those who prefer one-on-one help +can also post to the list, and an experienced developer may volunteer +to help you. You can get online help on IRC, too, if you join the +channel #debian-devel or #debian-mentors on irc.debian.org. Take a look +at the support section on in order to find +out more information. + +If you have some spare time and want to contribute it to Debian you +may wish to take a look at the "Work-Needing and Prospective Packages", +(WNPP) that can be found at . + +Welcome to the project! + +-- +Debian System Administrators on behalf of +The Debian New Maintainer Team + +__PASSWORD__ diff --git a/templates/welcome-message-guest b/templates/welcome-message-guest new file mode 100644 index 0000000..e161619 --- /dev/null +++ b/templates/welcome-message-guest @@ -0,0 +1,52 @@ +To: "__ENCODED_REALNAME__" <__EMAIL__> +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit +Subject: Debian Guest Account for __ENCODED_REALNAME__ +Cc: debian-admin@lists.debian.org +Reply-To: debian-admin@lists.debian.org +Date: __DATE__ +User-Agent: ud-useradd script run by __WHOAMI__ + +Dear __REALNAME__! + +An account has been created for you on the Debian machine cluster. You can +use this account to help make software run properly on the Debian +distribution. The username for this account is '__LOGIN__'. + +See for a list of machines that are +available. The list of which machines you can access is user-dependent. +To find out which machines you have access to try running + ldapsearch -LLL -b dc=debian,dc=org -x -h db.debian.org \ + uid=__LOGIN__ allowedHost + +On porter machines, the chroot environments can be entered with the +'schroot' command, depending on setup; take a look at the list of +machines to know which are our porterboxes. You can install build +dependencies yourself once you instantiated a session. Please +consult for more information +and ask your mentors if you need any help. + +You should use ssh to log into the machines. See the host details on +db.debian.org for the ssh hostkey fingerprints for the servers you +access. Our LDAP directory is able to share ssh RSA keys among +machines, please see for +general documentation and for how to add ssh keys to the LDAP. Please be +aware of the security implications of using RSA authentication and ssh +agents. + +Your password to access db.debian.org can be found encrypted with your +PGP key and appended to this message. It cannot be used to log into +our machines; see the paragraph on SSH keys above. + +After a short while this account will be expired, please contact DSA +if you need it for longer or wish to re-activate your account once +expired. This account is only to be used to help porting/improving free +software. + +Please note while technically there might be __LOGIN__@debian.org address +associated with this account we very much expect you to not use it. Thanks. +-- +Debian Administration + +__PASSWORD__ diff --git a/ud-useradd b/ud-useradd index d14edee..d6114ba 100755 --- a/ud-useradd +++ b/ud-useradd @@ -390,7 +390,7 @@ if Update == 1 and ForceMail == 0: # Send the Welcome message print "Sending Welcome Email" -templatepath = TemplatesDir + "/welcome-message-%d" % int(gidNumber) +templatepath = TemplatesDir + "/welcome-message-%s" % supplementaryGid if not os.path.exists(templatepath): templatepath = TemplatesDir + "/welcome-message" Reply = TemplateSubst(Subst,open(templatepath, "r").read())