TurnKey Linux Virtual Appliance Library

Default Drupal Login

Is there a default login for the Drupal page (bare ip).  I am able to login to webmin, mysql, phpmyadmin, etc.  with the passwords I provided during applicance setup but cannot request a new Drupal account since my ISP will not accept smtp from my residential address.  Is there an alternate way to set up the Drupal account from either the mgmt web pages or terminal?

Thanks in advance

Jeremy's picture

You set the Drupal admin account during firstboot (ie 'setup')

You can rerun the firstboot script but I am unsure of the consequences of that (there may be a risk to your data - I don't think it will, but not sure). So if you haven't enabled TKLBAM backups already then now is probably a good time to do it (or use some other means to backup all your data).

Then fo to the firstboot script directory, OTTOMH it should be something like this:

cd /usr/lib/inithooks/bin

and ist the contents with:

ls

there should be a script named something like drupal.py. Assuming that is the name, run it like this

./drupal.py

The other alternative is to follow the Drupal documentation on resetting the Admin password.

[edited] Corrected the filesystem location of the inithook scripts - sorry for any issues caused!

Can't Logon

Same here, the firstboot init script failed to set the Drupal password. Ideas?

I'm running the Drupal 7 vmdk within VMWare Player 5.0.1

http://www.turnkeylinux.org/download?file=turnkey-drupal7-12.0-squeeze-x...

Jeremy's picture

Did you try rerunning it?

Like I posted above, you can just rerun the Drupal init script (rather than the whole thing)

  yes, I tried following your

 

yes, I tried following your suggestion but the inithooks directory didn't exist. I couldn't find any drupal.py to execute.

So what I did do was drop and reload the VM. This time I was double sure to type the passwords correct and yet drupal still didn't allow me in.

Jeremy's picture

Oops... Very sorry...!!!

My mistake, I have given you incorrect info. The correct path to the init scripts is:

/usr/lib/inithooks/bin

Not /var/lib/... as I stated above. I apologise for the mistake. I have also edited my post above to reflect the corrent path.

Isolated Issue

Thanks. After reading the script I traced the issue to drush and can replicate issue manually.

when I enter the following drupal will authenticate "gma" as the admin password, not "$1gma"

      drush user-password admin --password=$1gma

once authenticated I can change my password to "$1gma"

perhaps this is a bug with the version of drush installed

===

people reading this: when installing this appliance select a simple drupal password (ie "abc123") during setup. You can later change it within drupal to something with complexity.

Jeremy's picture

No it's a limitation of Linux commandline

The dollar sign ($) is interpreted by the Linux commandline as announcement of a variable (other than assigning value; anytime you use a variable on the commandline or within a bash script you preface the variable name with $) and $1 is generally taken by the commandline to mean (the first) argument (the second argument or input string will be $2). So if you write a simple bash script that accepts input eg "simple-script blah" the value "blah" will be passed to the script as an argument, within the script you could then refer to $1 and it would equal blah (eg "echo $1" will print blah to the screen. So in this context your code:

drush user-password admin --password=$1gma

is telling drush that you want a password of gma (because $1 will be an empty string in the context of your line of code). To work around this, enclose your password in single quotes (') like this:

drush user-password admin --password='$1gma'

Single quotes tell the commandline to treat everything between them as a single string so it will set a password of $1gma

Note that it must be single quotes ('), not double quotes ("). Double quotes don't have the same effect.

drush user-password admin --password="$1gma"

will still result in a password of gma...

Yes, I figured

perhaps this can be logged for the next release? the init script properlly handles the same password for root, mysql, and other services

Jeremy's picture

So the init script doesn't handle the password with $ either?

Let me make sure I have this straight.

When entered into the firstboot scripts, the password with $ (eg your example $1gma) works fine for the root account, MySQL, other services you have tried. However when you try to set that as the Drupal password it fails (and in fact sets the password to gma)?

If that's the case, then IMO it's a bug in the TKL init scripts. I think that it's legitimate for it to not work using drush at the commandline (because of the Linux commandline limitations - which are well recognised by Linux admins and only a google away for anyone else - although a note somewhere stating this is not unreasonable). But for the firstboot scripts to not work as intended is a bug in my books...

Where would you suggest that the info about using single quotes for passwords should be displayed? Where would you have looked first? Where might you have seen it?

Too many error

Hello guys,

I'am trying, since some weeks, all appliances of TKL. Sometime there's no problems, and many times it's impossible to obtaint access into the web management interface : i can't, for example connect to Drupal 7, Wordpress ... etc. It seem that logon/login process can't read values given to first boot. I tried, as other, to hash a new password in phpmyadmin user table without any good result. Did you expect to solve this problem ? I use, for testing, virtualbox linux host, and for production XEN Server ... 

Friendly ...

Jeremy's picture

Shouldn't be like that

My first suspicion is that you have corrupted downloads. Have a look in the docs/wiki here for how to check.

Other things to check are keyboard layout (by default the keyboard layout is standard US - it may cause issues depending on the passwords you choose if your layout is different).

The other possibility OTTOMH is that some special characters are not working properly (there was a bug that did that years ago but I'm sure it was fixed - but maybe some special characters not working properly?). 

You can rerun the firstboot scripts again (assuming that you can login into the root account) with 'turnkey-init'.

Thank's

Many thanks, i'll try your solution as soon as possible ...

Init Script

Yes, when I suggested logging a bug I should have been specific. I'd revise the init script so the behavior is consistant for all passwords.

Jeremy's picture

Just to clarify...

Your experience is that the init scripts react differently to the same password. Ie you are able to set a root password including '$' but that same password when used for Drupal doesn't error, but doesn't actually use the password you set?

correct

correct

Jeremy's picture

Thanks

I have lodged a bug.

Test

Hello

I've try to generate news accounts with turnkey-init for all appliances witch dont work before, and all my problems were solved ... i think that's there's two possible way :

first -> keyboard mapping but i always use  numerics key for testing,

second -> bug in the preinit shell of the first install ...

Thank you for your disponibility ...

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)