I'm learning to work with linux but it isn't working out
Script 1, did work until I updated opensuse:
mysql -u root -ppassword
CREATE USER 'Test'@'localhost' IDENTIFIED BY 'password'
Run following cmd:
Output should be list some paths as below
If not then run below command:
Now try running above script-1, if it still gives same error, then you are missing some packages, install 'pam' package which contains mkhomedir_helper binaries, so run following command to install pam.
zypper in pam
Script 2, to run mysql query from command line or as a shell script you need to use '-e' option, change the script 2 as below:
#!/bin/bash mysql -u root -ppassword -e 'CREATE USER "Test"@"localhost" IDENTIFIED BY "password"'