Reset password of a User with Root priviliges after disabling Root Access WHM - ssh

Thanks for reading my question.
I have a big issue with SSH on my server;
I've disabled a month ago "root" access via SSH
Created a new user called "admin", added it to the wheel group and su root priviliges
This way, I will need to login with "admin" user only ...
But, but, the problem is NOW : I forgot the "admin" PASSWORD...
Is there anyway to fix this problem via WHM or SSH... ?
Regards,

It's not possible to change your admin pass through WHM. But I will suggest you please create one test account through WHM and enable shall access for that user, And after that you can add that user in wheel group and login SSH with that user password. After that you can reset the admin pass through root user.

Here is the best solution:
go to your Google Cloud account on deployment manager click to Opne SSH
follow this steps:
$ sudo passwd
New Password:______________
retype NewPassword :_______________

Related

whm password is invalid

I installed whm on centos7 to run cpanel on my server. After the installation finished, I cant login to whm , when I google it, I found the password by default is my root password for server but even with that i can't login.
Does anyone know what happened and what I should do?
Login via ssh as root and do a passwd root to change the password then try again

Plone 4 newbie can't create a web site - no username/password

I am a new Plone user. I have installed Plone from docker image eeacms/plone:4.3.7. But I can't create a web site because I have no username/password.
Thanks,
I have not used this Docker image. But the standard that I expect is: username admin and password admin.
When I look at the config in https://hub.docker.com/r/eeacms/plone/ this seems to be correct. See the 'user' option in the 'plone.recipe.zope2instance' recipe on that page.
Note that this username and password in the config file is only used once when there is no initial user yet. When you have started the site at least once, changing the user option will have no effect anymore. You can change the password later in the UI.
Follow the next instructions
cd data1/parts/zope2/utilities/
data1/parts/zope2/utilities/ is a path to utilities folder, that contains zpasswd.py script Note: data1 is not the default name of folder in a plone/zope installtion, find zpasswd.py
./zpasswd.py -u <user> -p <password> access
where <user> is an emergency user login name you are creating, <password> - password for this user to log in.
You will get a file access created in the utilities folder.
Move this access file into your instance (data1/parts/instance) folder with the following command
mv access ../../instance/
Now change your location form data1/parts/zope2/utilities to data1/bin, and restart your instance
cd ../../../bin
./instance restart
Login to ZMI with newly created emergency user login
Create usual Zope admin user and login with it to do all the necessary stuff in ZMI.
for more information see tutorial

Create user on non-booted Ubuntu

I was wondering if there were a way to create a user on an unbooted system (Ubuntu) ?
I have a HDD (Slave) which host a Ubuntu and I want to create a user on the system without booting on it.
Thanks for your answers !
I finally found a trick : I booted on a live USB, ant then did a useradd to add the user as i wanted to.
Then I copied the lines generated in the /etc/shadow and /etc/passwd to the HDD and it were done.
After you, Log into Ubuntu using your user name and password. Type "su root" and press "Enter."
Supply your root password to gain full system control privileges. Press "Enter" to confirm the action.
Create a new user account. Type "useradd -s /usr/sbin/nologin username" and press "Enter." Replace "username" with the name of the user you would like to create. This creates a new "No Login" account.

How to disable root login on Virtualmin

I’m using a vanilla Webmin / Virtualmin 3.93 GPL version on Centos 6. I’ve created a new user that has full privileges on Webmin, so now I want to disallow root from logging in, as obviously it could be a security issue.
Does anyone know how to do this? There must be an option for this somewhere but maybe I can’t see the wood for the trees.
I’ve disabled root SSH login manually, but I still can login to Webmin using the root account.
Thanks to #Charles for the pointers.
To remove the root user from Webmin, log in as a user with administrator privileges and click on Webmin -> Webmin Users.
In the list of users, either delete or remove all privileges from the root user.
After removing that user I could log in as my new administrator user and administer the server but not log in as root.
Problem solved, security through obscurity but still better than nothing.
Click on the Webmin tab, expand the Webmin section and select Webmin User. Then select the root user. Expand Security and Limit Options and select Only allow from listed addresses for IP Access Control. Enter the loopback address(127.0.0.1) into the field. The root user will still exist, but will be unable to login.
In Webmin -> Webmin Users click root and rename it to the username you use.

In Subversion can I be a user other than my login name?

I'd like to know how to get Subversion to change the name that my changes appear under.
I'm just starting to use Subversion. I'm currently using it to version control code on an XP laptop where I'm always logged in under my wife's name. I'd like the subversion DB to show the changes under my name.
Later on I'll replicate the DB so it is accessible to the whole house. My wife uses the office computer where she is always logged in under my name. I'll probably set it up so that it automatically checks in modified documents... preferably under her name.
Eventually I'll probably be using it from a linux machine under another username.
Is there some way to modify the user environment to change the user name that Subversion calls you? I'd expect something like setting SVN_USERNAME='Mark' which would override however it usually gets the name.
Update: It looks like the --username flag that Michael referred to does work to change the name reported by "svn stat", even for local file: repositories. In addition, it is sticky so you don't need to specify it for the next command. I even rebooted and it still used the "--username" value from my previous boot.
Most Subversion commands take the --username option to specify the username you want to use to the repository. Subversion remembers the last repository username and password used in each working copy, which means, among other things, that if you use svn checkout --username myuser you never need to specify the username again.
As Kamil Kisiel says, when Subversion is accessing the repository directly off the file system (that is, the repository URL is of form file:///path/to/repo or file://file-server/path/to/repo), it uses your file system permissions to access the repository. And when you connect via SSH tunneling (svn+ssh://server/path/to/repo), SVN uses your FS permissions on the server, as determined by your SSH login. In those cases, svn checkout --username may not work for your repository.
For svn over ssh try:
svn list svn+ssh://[user_name]#server_name/path_to_repo
svn will prompt you for the user_name's password.
You can setup a default username via ~/.subversion/servers:
[groups]
yourgroupname = svn.example.com
[yourgroupname]
username = yourusername
Please be aware that older versions of svn do not support it (e.g. 1.3.1 [sic!]).
"svn co --username=yourUserName --password=yourpassword http://path-to-your-svn"
Worked for me when on another user account. You will be prompted to enter username/password again though. You need to login like the above once and you are all set for the subsequent times(Unless you restart your machine).
If you need to specify a username other than your logged in user for use with svn+ssh just add an entry to your .ssh/config file:
Host example.com
User jdoe
Subversion usually asks me for my "Subversion username" if it fails using my logged in username. So, when I am lazy (usually) I'll just let it ask me for my password and I'll hit enter, and wait for the username prompt and use my Subversion username.
Otherwise, Michael's solution is a good way to specify the username right off.
Most of the answers seem to be for svn+ssh, or don't seem to work for us.
For http access, the easiest way to log out an SVN user from the command line is:
rm ~/.subversion/auth/svn.simple/*
Hat tip: http://www.yolinux.com/TUTORIALS/Subversion.html
Using Subversion with either the Apache module or svnserve. I've been able to perform operations as multiple users using --username.
Each time you invoke a Subversion command as a 'new' user, your $HOME/.subversion/auth/<authentication-method>/ directory will have a new entry cached for that user (assuming you are able to authenticate with the correct password or authentication method for the server you are contacting as that particular user).
I believe if you use the file:// method to access your subversion repository, your changes are always performed under the user which accesses the repository. You need to use a method that supports authentication such as http:// or svn://.
See http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.serverconfig.choosing
If you are using svn+ssh to connect to the repository then the only thing that authenticates you and authorizes you is your ssh credentials. EVERYTHING else is ignored. Your username will be logged in subversion exactly as it is established in your ssh connection. An excellent explanation of this is at jimmyg.org/blog/2007/subversion-over-svnssh-on-debian.html
Go to ~/.subversion/auth/svn.simple/*, and you will see a list of files that contains the information about your svn user account. Just delete all others that you don't need.
After that, when you do anything that regards to SVN operation, such as commit, rm, etc,. You will be prompt again to enter username or passwords.
TortoiseSVN always prompts for username. (unless you tell it not to)
I believe you can set the SVN_USER environment variable to change your SVN username.