I just finished installing cPanel in a CentOS VM in Google Cloud Engine and cPanel said the default username is root and the default password is the server's root password.
2016-01-26 12:02:52 958 ( INFO): 3. Enter the word root in the Username text box
2016-01-26 12:02:52 958 ( INFO):
2016-01-26 12:02:52 958 ( INFO): 4. Enter your root password in the Password text box
2016-01-26 12:02:52 958 ( INFO):
2016-01-26 12:02:52 958 ( INFO): 5. Click the Login button
How do I get the server's root password?
Figured it out. The VM's in cloud engine don't come with a root password setup by default so you'll first need to change the password using
sudo passwd
If you do everything correctly, it should do something like this:
user#server[~]# sudo passwd
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
This work at least in the Debian Jessie image hosted by Google:
The way to enable to switch from you regular to the root user (AKA “super user”) after authentificating with your Google Computer Engine (GCE) User in the local environment (your Linux server in GCE) is pretty straight forward, in fact it just involves just one command to enable it and another every time to use it:
$ sudo passwd
Enter the new UNIX password: <your new root password>
Retype the new UNIX password: <your new root password>
passwd: password updated successfully
After executing the previous command and once logged with your GCE User you will be able to switch to root anytime by just entering the following command:
$ su
Password: <your newly created root password>
root#intance:/#
As we say in economics “caveat emptor” or buyer be aware: Using the root user is far from a best practice in system’s administration. Using it can be the cause a lot of trouble, from wiping everything in your drives and boot disks without a hiccup to many other nasty stuff that would be laborious to backtrack, troubleshoot and rebuilt.
On the other hand, I have never met a SysAdmin that doesn’t think he knows better and root more than he should.
REMEMBER: We humans are programmed in such a way that given enough time at one at some point or another are going to press enter without taking into account that we have escalated to root and I can assure you that it will great source of pain, regret and extra work. PLEASE USE ROOT PRIVILEGES SPARSELY AND WITH EXTREME CARE.
Having said all the boring stuff, Have fun, live on the edge, life is short, you only get to live it once, the more you break the more you learn.
I had the same problem. Even after updating the password using sudo passwd it was not working. I had to give "multiple" roles for my user through IAM & Admin
Refer Screen Shot on IAM & Admin screen of google cloud
After that i restarted the VM. Then again changed the password and then it worked.
user1#sap-hanaexpress-public-1-vm:~> sudo passwd
New password:
Retype new password:
passwd: password updated successfully
user1#sap-hanaexpress-public-1-vm:~> su
Password:
sap-hanaexpress-public-1-vm:/home/user1 # whoami
root
sap-hanaexpress-public-1-vm:/home/user1 #
I tried "ManiIOT"'s solution and it worked surprisingly.
I've added another role (Compute Admin Role) for my google user account from IAM admin. Then stopped and restarted the VM.
Afterwards 'sudo passwd' let me to generate a new password for the user.
So here are steps.
Go to IAM & Admin
Select IAM
Find your user name service account (basically your google account) and click Edit-member
Add another role --> select 'Compute Engine' - 'Compute Admin'
Restart your Compute VM
open SSH shell and run the command 'sudo passwd'
enter a brand new password. Voilà!
Related
I am trying to copy a file from a non domain server, but everytime we run the net use command it will hang and then say that the specified network password is not correct.
- net use \\IpAddress\Folder\ password /user:userid
But if we remove the user from the command, then we get prompted for a password. Enter in the same password that we had input previously, and it works.
- net use \\IpAddress\Folder\ /user:userid
What is the disconnect here? Or is there a way to open this share to all users and not have a need for credentials?
I'm new in odoo world and I'm wondering if it's better to create a new account in order to use odoo, or just use the default admin account directly?
I do not like showing the admin in the contact list, so I would prefer to use the admin account directly by renaming it correctly with my personal information.
However, if it is better to use the administrator account just for installations and configurations tasks, I should use for hide admin account this module https://www.odoo.com/apps/modules/10.0/hidden_admin/ or is there anyway a more integrated solution?
Thanks in advance
There is nothing inherently wrong with using the Administrator account in production as long as whoever is using that login can be trusted. I would recommend using the user's real Name and Email as login instead of Administrator and admin.
Another consideration is that some activities are programmed to be executed under administrator (usually via a sudo call somewhere in the code). This just means that there may be times where an action appears to have been done by the Administrator account, but it may have actually been triggered by a different user. I don't have a list of those actions, but you can search the codebase for .sudo( to review them for your situation.
grep -rn /path/to/core -e '\.sudo(' --include='*.py'
If that fails for some reason you can do a more generic search. The majority of these results will still be relevant.
grep -rn ./ -e 'sudo' --include='*.py'
I have a serious login problem with my new (and first ever) Drupal 7 site.
I have two different users so far, which of one is the admin which was created while installing Drupal. If, I log in with the other user's username and password, still, the hovering admin menu will and the menu shows the username of the admin user. This happens, if I log in to both accounts from the same computer, but now I tested the non-admin account from a computer that have never been used to log in the particular site before, and the problem
I am using the current 7.34 core of Drupal 7. The login module is the built-in one of the core.
How is this possible and what can be done about it?
Remove cookies from your browser for this site
Make sure your second user has not admin role.
I got the django-nonrel setup fine, and worked through the first 5 chapters of the djangobook without any real problems. I'm currently on chapter 6 which talks about creating the admin site. http://www.djangobook.com/en/2.0/chapter06/ But, I can't login.
I can get to the admin login page on localhost, but it always says my username and password are incorrect.
Some suggest to "Go into your database and inspect the auth_user table. Make sure that is_staff is set to TRUE on the user you are using to log in." I went into here: "python manage.py shell" And saw that my superuser was there, and that is_staff was true.
I created a superuser with the server running and without it running, and neither one allowed me to login afterwords.
One user (crogjer) suggested the following:
This might be the problem:
You have setup a database for a normal django project.
So manage.py createsuperuser will create a superuser in that database.
In case of GAE SKD, it uses the GAE Datastore, so the superuser you created is not present >there.
This is what you could do:
Create a normal user
Go to /_ah/admin/ and modify the data for user table in datastore, changing the desired >users is_superuser field to True.
What is the SKD? Does that sound like the answer to my problems? If so, how do I create a normal user?
Here are some of the reference posts I saw:
I've looked around at the following posts:
Can't login to Django /admin interface
django-nonrel google app engine fail to log in admin panel
Django-nonrel can't login as super user
Any ideas what I might be doing wrong?
Thanks!
I got it. I was running the server through the GoogleAppEngineLauncher when it wasn't working, and I just needed to stop the local server, create the super user, and then run it through
python manage.py runserver
I am pretty sure that the settings that I am using are correct, so all possible things can be wrong which I should check out so that I can make authentication with our Active Directory work.
Try test if PHP can connect to active directory
<?php
$ds = ldap_connect('host.ad.lan', 389);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
ldap_bind($ds, 'admin#ad.lan', 'xxx');
$sr = ldap_search($ds, 'CN=Cameron Zemek,OU=Users,OU=BRC,DC=ad,DC=lan', '(objectclass=*)', array('cn'));
$entryID = ldap_first_entry($ds, $sr);
$data = ldap_get_attributes($ds, $entryID);
print_r($data);
ldap_close($ds);
What do you have has your $config['ldap_user'] and $config['ldap_uid'] ? You want to set $config['ldap_uid'] to sAMAccountName
There is a trick to do activeDirectory auth with phpbb3. You should:
make an account in phpBB with a name identical to some AD-name
give this account admin/founder rights in phpBB
login with this account
set up auth parameters from within this account
By the way, what error messages do you get from phpBB?
#grom... thanks but, yes PHP is working just fine. I have a WordPress and a MediaWiki installation on the same server, and they are both authenticating against the same active directory just fine.
phpBB3 does not offer much info about how to enable LDAPS, so I hope this helps someone...
Note that you may need to actually clear all phpBB3 cookies immediately after the base installation. This will allow the admin user to see the ACP. Once you are able to consistently log into phpBB3 as an admin, and want to enable LDAPS authentication, do the following (tested with AD and Debian stretch):
Obtain the root TLS certificate from your AD/LDAP Administrator, or get it yourself with something like:
# openssl s_client -showcerts -connect google.com:443
See the MediaWiki documentation, as phpBB3 docs are quite sparse:
https://www.mediawiki.org/wiki/Extension:LDAP_Authentication/Requirements
Install the PEM formatted certificate with a .crt name into your OS certificate store. For Debian based systems, that would be /usr/local/share/ca-certificates then run # dpkg-reconfigure ca-certificates
Configure /etc/ldap/ldap.conf to your local settings. Note that port 3268 may not have in-built limits like 686 with AD. YMMV.
Create a special AD user for binding. Give it permissions to lookup, but not to change, attributes. Confirm that the credentials work with ldapsearch. eg: ldapsearch -x -LLL -h ad.mydomain.com -D binduser -W -z 30 -b "dc=mydomain,dc=com" searchString
Create a phpBB3 user with the same username as the above AD bind user. As the phpBB3 admin, grant the AD bind user Founder permissions.
Using a different browser, log into phpBB3 as the binduser, then set up the LDAP Authentication as that user. (As noted in the above post).
Test it! Logout of phpBB3 and then login again using the LDAP/AD credentials.
If that does not work, the PHP dev documentation is quite good, and offers many comments with examples and example code to try.