Super/Root Administrator needs to create a Limited Administrator

I'm not sure if I'm looking for the right terms, but I can't seem to find any information on setting up site Administrators.

I've read that you shouldn't use the UID1 user account (aka first user, Root, Super Administrator etc) for day to day use. Fine, that makes sense. But what if I want to set up a lower level Administrator account, that can do almost everything that the Root admin can do except lock-out or change the Root admin's account, email address or access permissions? I want this lower level admin to be able to manage the whole site except for a few key things.

Here's my situation: I've built a site with Drupal for a client. It's now time to hand over the controls and let their IT guys deal with their, hosting, users and content. But, the site isn't 100% finished yet, as there are still a few little things here and there that will of course pop-up when the site goes into production use. I will of course fix these issues, but if these new IT guys start poking around in the templates, modules, and settings, things may go foobarred. And I may be in a bit of pickle if I can't figure out how to keep control.

I also expect (hope) that they will come back to me for the 2nd phase in a few months.

The cheque is also 'in the mail', but we haven't received it yet (though we have received 2 previous payments), so there's that issue.

So here's what I'm looking for: to setup a limited administrator or "webmaster" account that can do almost everything except lock me out. I guess I'm looking for a back-door. Right now it seems as though the Access Control area is limited to "ON or OFF" type settings. The User Module only gives "administer users" 'yes' or 'no'. I'd like it to say "administer users (except UID1/Root Admin)".

4.7 Module Examples Need Updating

When will these be updated? I'm trying to learn how to make a module and it doesn't help that the examples haven't been updated to the new 4.7 api.

external php scripts using drupal APIs

I'm stumbling my way through importing some spreadsheets into Drupal and I can use a php script in a node to import with, but my question is how can an external PHP script access Drupal APIs?

Gathering Documentation Data: Views

I want to gather a complete list of modules that currently support Views, and and some basic information about that support (such as: Is it built in? Does it require an additional module?) and perhaps a short paragraph about what can be done with the Views support.

I'd also like to include modules that in some way extend views.

I'd appreciate comments on this thread to help build the list.

To start:

SMTP Auth - Revisited for 4.7 (Windows)

I don't know whether this is the right place to put this comment, so if there is a better place, feel free to repost this where you think it belongs.

Amazingly, Drupal 4.7 still doesn't have an SMTP Auth capability built in. It is trivial to add it, though, so maybe that is why.

Here is what I did to implement SMTP Auth for my windows installation. I'm not going to pretend that this is the most efficient way of making SMTP Auth work, but it did work for me (after too much trial and error, even after reading all the other documentation and posts I could find here at drupal.org - maybe that says more about me than anything else).

1. Download two include files and put them into the /includes folder. These two files are:

a. smtp.inc
b. class.smtp.inc

I found my /includes folder at c:\program files\apache\www\Drupal\includes

Of course, your installation might find this folder in a different location.

At the time of this writing, these files could be found at:

http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/tricks/smt...

and:

http://drupal.org/files/issues/class.smtp.inc

I will also copy these files inline, just to make sure they don't get lost (see below).

2. Modify the settings.php file so that the code in the above include files gets included. I found settings.php in my c:\program files\apache\www\Drupal\sites\default\ folder. Of course, your installation might find this file in a different location.

The specfic modification that I did to my settings.php file was to add the following line:

$conf["smtp_library"]="./includes/smtp.inc";

You can add the line virtually anywhere in the file and it will work.

3. Make sure you stop and restart the apache server and php so that the above settings file takes affect.

4. Modify the smtp.inc file so that it has the information needed.

These are the lines that I confirmed/set:

$params['port'] = 25;
$params['helo'] = $_SERVER['__mysmtpserver__'];
$params['auth'] = TRUE;
$params['user'] = '__emailusername__';
$params['pass'] = '__password__';

where __mysmtpserver__ is replaced with the internet address of your smtp server. It can be a dotted quad (e.g., 10.0.1.2) or a FQDN (e.g., smtp.mydomain.com).

where __emailusername__ is replaced with the name of the user you intend the system to pretend to be so that it can use the smtp server

where __password__ is the plain text password

Be sure to replace both the words and the underscores both before and after.

5. Modify the class.smtp.inc file so that it has the information needed.

These are the lines that I set:

$this->host = '__mysmtpserver__';
$this->port = 25;
$this->helo = '__mysmtpserver__';
$this->auth = TRUE;
$this->user = '__emailusername__';
$this->pass = '__password__';

Yes, I know that it is highly likely that some part of the above changes were redundant.

I can live with that because it just works.

I hope this helps somebody.

Mike

Here is the smtp.inc file:

<?php
// $Id: smtp.inc,v 1.6 2003/12/11 13:59:58 mathias Exp $
include_once 'includes/class.smtp.inc';

function user_mail_wrapper($mail, $subject, $message, $header) {
// The smtp server host/ip
$params['host'] = ini_get('SMTP');
// The smtp server port
$params['port'] = 25;
// What to use when sending the helo command. Typically, your domain/hostname
$params['helo'] = $_SERVER['HTTP_HOST'];
// Whether to use basic authentication or not
$params['auth'] = FALSE;
// Username for authentication
//$params['user'] = 'testuser';
// Password for authentication
//$params['pass'] = 'testuser';

// The recipients (can be multiple)
$send_params['recipients'] = $mail;
// The headers of the mail
$send_params['headers'] = explode("\n", $header ."\nSubject: $subject\nTo: $mail");
// The body of the email
$send_params['body'] = str_replace("\n", "\r\n", $message);

$smtp = smtp::connect($params);
if (count($smtp->errors)) {
watchdog('error', 'mail connect error: '. implode('

Drupal Licensing | Simple, simpler... possible?

I have read the (lively) discussion on topic at "Need clarification on the license" and at "CVS: Update FAQ.txt to clarify the impact of GPL on HTML output", and a description of basic licenses (GPL, LPGL, BSD, etc...) in this book:

Book Review | Open Source for the Enterprise: Managing Risks - Reaping Rewards

I am a lawyer (although not practicing in this field). I am not a programmer nor a developer. I am also working on introducing Drupal in the federal government (Canada). I have no ideological preferences for licensing (or not) code under GPL or other licenses.

I am, however, interested in upfront licensing clarity from the perspective of final clients (and not only developers); including corporate / large institutional clients. I do not think that licensing, when it comes to Drupal, is clear. I am offering to help - but I need your advice on what I could best contribute, how and where.

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Documentation