403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.107.52
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/auth_sec/r/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/auth_sec/r/access_credential_control.result

=======================================================================
Checking the password plugin assignment with create user command
=======================================================================

**** Creating user with mysql_native_password plugin
select @@session.old_passwords;
@@session.old_passwords
0
0 Expected
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED BY 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the plugin names
select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password'
1
1 Expected
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';


=======================================================================
Checking the password plugin assignment with grant user command
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT usage on mysql.* to 'Tanjotuser1'@'localhost' IDENTIFIED BY 'abc';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT usage on mysql.* to 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password' BY '123';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the plugin names
select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password'
1
1 Expected
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';


=======================================================================
Checking the functionality and integrity of the DROP user command
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED BY 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
Connecting a session each with the above 3 users
dropping the above 3 users with each having a open session
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';
Now trying opening a new session for the above dropped user
ERROR 28000: Access denied for user 'Tanjotuser1'@'localhost' (using password: YES)
ERROR 28000: Access denied for user 'Tanjotuser3'@'localhost' (using password: YES)
Accessing the open sessions for the above dropped user
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost


=======================================================================
Checking the privellages post renaming the user
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED BY 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the plugin names
select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password'
1
1 Expected
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
**** Validating the integrity of the rename user command
RENAME USER 'Tanjotuser1'@'localhost' to 'user1'@'localhost';
RENAME USER 'Tanjotuser3'@'localhost' to 'user3'@'localhost';
**** Validating the plugin names
select (select plugin from mysql.user where User='user1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='user1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='user3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='user3' and Host='localhost')='sha256_password'
1
1 Expected
**** Validating the user connections post renaming
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
ERROR 28000: Access denied for user 'Tanjotuser1'@'localhost' (using password: YES)
ERROR 28000: Access denied for user 'Tanjotuser3'@'localhost' (using password: YES)
select user(), current_user();
user()	current_user()
user1@localhost	user1@localhost
select user(), current_user();
user()	current_user()
user3@localhost	user3@localhost
**** Disconnecting the open sessions and dropping the created users
Drop user 'user1'@'localhost';
Drop user 'user3'@'localhost';


=======================================================================
Checking the privillages with grant user command
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT select on mysql.* to 'Tanjotuser1'@'localhost' IDENTIFIED BY 'abc';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT select on mysql.* to 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password' BY '123';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the granted privilleges
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
plugin
mysql_native_password
mysql_native_password Expected
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
plugin
sha256_password
sha256_password Expected
**** Revoking select on mysql database
Revoke select on mysql.* from 'Tanjotuser1'@'localhost';
Revoke select on mysql.* from 'Tanjotuser3'@'localhost';
**** Validating the Revoked privilleges
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser1'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser3'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
Grant usage on mysql.* to 'Tanjotuser1'@'localhost';
Grant usage on mysql.* to 'Tanjotuser3'@'localhost';
**** Validating the granted privilleges
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser1'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser3'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
**** Validating the granted privilleges
Grant All on mysql.* to 'Tanjotuser1'@'localhost';
Grant All on mysql.* to 'Tanjotuser3'@'localhost';
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
plugin
mysql_native_password
mysql_native_password Expected
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
plugin
sha256_password
sha256_password Expected
**** Disconnecting the open sessions and dropping the created users
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';


=============================================================================
Checking the password assignment using the update command on the user table
=============================================================================

**** Creating user with mysql_native_password plugin
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
set @@session.old_passwords=0;
UPDATE mysql.user SET Authentication_string=PASSWORD('abc') WHERE User='Tanjotuser1' AND Host='localhost';
FLUSH PRIVILEGES;
**** Creating user with sha256_password plugin
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
set @@session.old_passwords=2;
UPDATE IGNORE mysql.user SET Authentication_string=PASSWORD('abc') WHERE User='Tanjotuser3' AND Host='localhost';
FLUSH PRIVILEGES;
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
set password='abcd';
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
**** Disconnecting the open sessions and dropping the created users
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';


===================================================================================================
Starting the server with default auth as sha256_password and checking the above validations again.
===================================================================================================

# Restart server with default-authentication-plugin=sha256_password;


=======================================================================
Checking the password plugin assignment with create user command
=======================================================================

**** Creating user with mysql_native_password plugin
select @@session.old_passwords;
@@session.old_passwords
0
0 Expected
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH  'mysql_native_password';
SET PASSWORD for 'Tanjotuser1'@'localhost' = 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the plugin names
select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password'
1
1 Expected
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';


=======================================================================
Checking the password plugin assignment with grant user command
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT usage on mysql.* to 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY '123';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
SET PASSWORD for 'Tanjotuser1'@'localhost' = 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT usage on mysql.* to 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password' BY '123';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the plugin names
select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password'
1
1 Expected
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';


=======================================================================
Checking the functionality and integrity of the DROP user command
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED BY 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
Connecting a session each with the above 3 users
dropping the above 3 users with each having a open session
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';
Now trying opening a new session for the above dropped user
ERROR 28000: Access denied for user 'Tanjotuser1'@'localhost' (using password: YES)
ERROR 28000: Access denied for user 'Tanjotuser3'@'localhost' (using password: YES)
Accessing the open sessions for the above dropped user
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost


=======================================================================
Checking the privellages post renaming the user
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
SET PASSWORD for 'Tanjotuser1'@'localhost' = 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the plugin names
select (select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='Tanjotuser1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='Tanjotuser3' and Host='localhost')='sha256_password'
1
1 Expected
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
**** Validating the integrity of the rename user command
RENAME USER 'Tanjotuser1'@'localhost' to 'user1'@'localhost';
RENAME USER 'Tanjotuser3'@'localhost' to 'user3'@'localhost';
**** Validating the plugin names
select (select plugin from mysql.user where User='user1' and Host='localhost')='mysql_native_password';
(select plugin from mysql.user where User='user1' and Host='localhost')='mysql_native_password'
1
1 Expected
select (select plugin from mysql.user where User='user3' and Host='localhost')='sha256_password';
(select plugin from mysql.user where User='user3' and Host='localhost')='sha256_password'
1
1 Expected
**** Validating the user connections post renaming
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
ERROR 28000: Access denied for user 'Tanjotuser1'@'localhost' (using password: YES)
ERROR 28000: Access denied for user 'Tanjotuser3'@'localhost' (using password: YES)
select user(), current_user();
user()	current_user()
user1@localhost	user1@localhost
select user(), current_user();
user()	current_user()
user3@localhost	user3@localhost
**** Disconnecting the open sessions and dropping the created users
Drop user 'user1'@'localhost';
Drop user 'user3'@'localhost';


=======================================================================
Checking the privillages with grant user command
=======================================================================

**** Creating user with mysql_native_password plugin
set @@session.old_passwords=0;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT select on mysql.* to 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY '123';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
SET PASSWORD for 'Tanjotuser1'@'localhost' = 'abc';
**** Creating user with sha256_password plugin
set @@session.old_passwords=2;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.
GRANT select on mysql.* to 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password' BY '123';
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
SET PASSWORD for 'Tanjotuser3'@'localhost' = 'abc';
**** Validating the granted privilleges
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
plugin
mysql_native_password
mysql_native_password Expected
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
plugin
sha256_password
sha256_password Expected
**** Revoking select on mysql database
Revoke select on mysql.* from 'Tanjotuser1'@'localhost';
Revoke select on mysql.* from 'Tanjotuser3'@'localhost';
**** Validating the Revoked privilleges
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser1'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser3'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
Grant usage on mysql.* to 'Tanjotuser1'@'localhost';
Grant usage on mysql.* to 'Tanjotuser3'@'localhost';
**** Validating the granted privilleges
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser1'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
ERROR 42000: SELECT command denied to user 'Tanjotuser3'@'localhost' for table 'user'
select user(), current_user();
user()	current_user()
Tanjotuser3@localhost	Tanjotuser3@localhost
**** Validating the granted privilleges
Grant All on mysql.* to 'Tanjotuser1'@'localhost';
Grant All on mysql.* to 'Tanjotuser3'@'localhost';
select plugin from mysql.user where user='Tanjotuser1' and host='localhost';
plugin
mysql_native_password
mysql_native_password Expected
select plugin from mysql.user where user='Tanjotuser3' and host='localhost';
plugin
sha256_password
sha256_password Expected
**** Disconnecting the open sessions and dropping the created users
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';


=============================================================================
Checking the password assignment using the update command on the user table
=============================================================================

**** Creating user with mysql_native_password plugin
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
set @@session.old_passwords=0;
UPDATE mysql.user SET Authentication_string=PASSWORD('abc') WHERE User='Tanjotuser1' AND Host='localhost';
FLUSH PRIVILEGES;
**** Creating user with sha256_password plugin
CREATE USER 'Tanjotuser3'@'localhost' IDENTIFIED WITH 'sha256_password';
set @@session.old_passwords=2;
UPDATE IGNORE mysql.user SET Authentication_string=PASSWORD('abc') WHERE User='Tanjotuser3' AND Host='localhost';
FLUSH PRIVILEGES;
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
set password='abcd';
select user(), current_user();
user()	current_user()
Tanjotuser1@localhost	Tanjotuser1@localhost
**** Disconnecting the open sessions and dropping the created users
Drop user 'Tanjotuser1'@'localhost';
Drop user 'Tanjotuser3'@'localhost';
set @@session.old_passwords=default;
Warnings:
Warning	1681	'old_passwords' is deprecated and will be removed in a future release.

Youez - 2016 - github.com/yon3zu
LinuXploit