Nội dung
How to create a one-time login URL on DirectAdmin with 3 steps extremely simple.
Introduction
On DirectAdmin, there is a nice feature that supports a direct login URL without entering User/Password information. This makes it easy for administrators or users to log in to DirectAdmin immediately without entering User/Password. Specifically, regarding how to create this URL, please continue to see the implementation instructions below.
Implementation Guide
Step 1: SSH into your DirectAdmin system
To create a URL login once on DirectAdmin, we first need to SSH or access your VPS/server with root privileges. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:
After successfully SSH, we continue with step 2 to continue the configuration.
Step 2: Create a login URL
The login URL function allows you to create a URL and the user will access that URL to log in automatically, and you can only access it once, that is, if you have logged in for the first time, then The second time you access that URL, you won’t be able to access it anymore.
By default, the URL is valid for 3 days, which means that from the time you create the URL, after 3 days, you will no longer be able to access it. You can change this time period with other options according to the information below.
You use the command structure below to create the URL login:
/usr/local/directadmin/directadmin --create-login-url user=USERNAME
In there, USERNAME is the User name on DirectAdmin for which you want to create the URL.
Here are some good examples with different options that you can refer to.
- Create the default login URL for the Admin user (the link will expire after 3 days), then I will use the following command:
/usr/local/directadmin/directadmin --create-login-url user=admin
- Create a login URL for the User with additional options for the expiration time of the link [seconds (s), minutes (m), hours (h), day (d), month (M), year (y)], the structure will as below:
/usr/local/directadmin/directadmin --create-login-url expiry=[s,m,h,d,M,y] user=USERNAME
For example, I will create a URL and set the link will expire after 1 hour, I use the following command:
/usr/local/directadmin/directadmin --create-login-url expiry=1h user=admin
- Create a URL and allow access to only one or certain IPs, the structure will be like this:
/usr/local/directadmin/directadmin --create-login-url ips=IP1,IP2 user=USERNAME
For example, I will create a URL and only allow my IP of 103.221.220.34 to access the above link, I use the following command:
/usr/local/directadmin/directadmin --create-login-url ips=103.221.220.34 user=admin
Note: For commands without an expiry option, the default link will be valid for 3 days.
Step 3: Check the result
In this article, I will create a URL and set it only to allow my IP to access it, and after I run the command to create URL, the system will create a link as below:
Now I will try to copy that link and paste it into the browser, you can see the results in the video below:
So in this article, AZDIGI showed you how to create a URL login once on DirectAdmin very simply, with this way, you can allow others to access your DirectAdmin without having to send information to them, this helps security and saves time when having to enter User/password.
You can refer to other instructions at the link below:
If you need assistance, you can contact support in the ways below:
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com .