Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5997151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:13:20+00:00 2026-05-23T00:13:20+00:00

I want add new user from another script and I need create password for

  • 0

I want add new user from another script and I need create password for Drupal7 users, I can’t find exact function which is doing it on Drupal, what function is that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:13:21+00:00Added an answer on May 23, 2026 at 12:13 am

    With drupal 7, password are no more encrypted through md5.

    There are several way to get/set a password in drupal7.

    Using drush (for your information, not used in your case):

    drush upwd admin --password="newpassword"
    

    Without drush, if you have a cli access to the server : (for your information, not used in your case)

    cd <drupal root directory>
    php scripts/password-hash.sh 'myPassword'
    

    Now copy the resultant hash and paste it into the query:

    update users set name='admin', pass='pasted_big_hash_from_above' where uid=1;
    

    If you are working on a remote environment on which you cannot connect, you can put this specified code in a file such as password.php such as this one:

    <?php
    if (isset($_GET['p'])) {
      require_once dirname(__FILE__) . '/includes/bootstrap.inc';
      require_once dirname(__FILE__) . '/includes/password.inc';
      print _password_crypt('sha512', $_GET['p'], _password_generate_salt(DRUPAL_HASH_COUNT));
      exit();
    }
    print "No password to hash.";
    

    And then hit your site using: http://domain.tld/password.php?p=‘MyPassword’. The hash will appear on your browser’s tab.
    Don’t forget to remove it once you done it.

    So, if you want to use some password function generation, have a look on _password_crypt() and _password_generate_salt()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add a new filter to the Project Explorer, to hide from
I want to give users the possibility to dynamically add new columns at the
I want to add the current_user.id from devise to another model... question model: class
I want to add a new time-field to a an existing MySQL-table that is
I want to add a new tab page for every newly opened form. Example:
I want to add a new feature in a wxPython class. I also want
I want to add a new Stage called field to the default one (i
I am new to iphone development.I want to add RegexKitLite framework.I have downloaded the
I want to add days to a date to get a new date in
Hi when I add a new component using Actionscript I want it to fade

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.