Does anyone know how to enable secure admin from script? The problem is that the command asadmin enable-secure-admin requires authentication from the commandline but I would like to do that by script. I already tried to save the user/password in a temporary file and then passing it in by asadmin enable-secure-admin < auth.txt but unfortunately I get an authentication failure for user null
Has anyone already done this?
I discovered the solution by myself I only had to read the command help ;-)
Usage: asadmin [-H|--host <host(default:localhost)>]
[-p|--port <port(default:4848)>] [-u|--user <user(default:admin)>]
[-W|--passwordfile <passwordfile>]
[-t|--terse[=<terse(default:false)>]]
[-s|--secure[=<secure(default:false)>]]
[-e|--echo[=<echo(default:false)>]]
[-I|--interactive[=<interactive(default:true)>]]
[-?|--help[=<help(default:false)>]
[--detach(default:false)]
[--notify(default:false)] [subcommand [options] [operands]]
Here's what I did: asadmin --interactive=false --user admin --passwordfile /path/to/passwordfile enable-secure-admin
Related
I have searched this forum for help on my specific issue, but can't find enough documentation to solve the error I am getting. I believe there is a configuration issue between snowsql and my trial snowflake account.
C:\Users\barberc> snowsql -a tyXXXXX.us-east-2 -u XXXXXX#gmail.com
Password:
250001 (n/a): Could not connect to Snowflake backend after 0 attempt(s).Aborting
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!
I have also tried appending the ".aws" on it, but that doesn't seem to help.
I am trying to load data from a .csv into a database to work with.
Thank you in advance
enter image description here
You should run this SQL command to get your Snowflake account URL
use role accountadmin;
select system$whitelist();
Look for [{"type":"SNOWFLAKE_DEPLOYMENT","host":"xxxxx.ap-southeast-2.snowflakecomputing.com","port":443},
Extract the hostname before snowflakecomputing.com, that would be the account name to use in snowsql.
In this example, it will be
snowsql -a xxxxx.ap-southeast-2
You may also want to check with curl command, to make sure you can reach the Snowflake account.
curl -vvv https://xxxxx.ap-southeast-2.snowflakecomputing.com/console/login
If you found HTTP 200, that means a connection is established. Otherwise, there could be a proxy/firewall or routing issue.
(I have Centos 7 with samba-client.x86_64 4.6.2-8.el7 against windows server 2008 that is in a AD Domain controlled by separate windows server 2008 AD domain controller)
Started with this:
smbclient -W my.domain -U myuser //svr.my.domain/fred mypassword -c list
... which worked great, then decided to move domain,user and password into a file and use -A as described in the smbclient manpage. File windows-credentials, content:
username=myuser
domain=my.domain
password=mypassword
... with command line:
smbclient -A windows-credentials //svr.my.domain/fred -c list
.... did not work, gave error:
SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY
session setup failed: NT_STATUS_NO_MEMORY
... an hour on the internet suggested lots of people had this trouble and just about each had a different ticked answer, and none of them worked for me. Tried various combinations of their answers - in particular, https://askubuntu.com/questions/1008992/ubuntu-17-10-to-access-windows-files-shares-within-workplace-it, and ended up with...
Created a separate my.smb.conf with just:
[global]
# seems to get rid of
# SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY
client use spnego = no
# seems to get rid of
# session setup failed: NT_STATUS_NO_MEMORY
client ntlmv2 auth = no
... and used:
smbclient -s my.smb.conf -A windows-credentials //svr.my.domain/fred -c list
... and it looks like it works, but I'm not really sure as there seems to be credentials caching and a complete lack of information on how this stuff works or is supposed to work.
Can anyone actually explain any of this? Even if not, perhaps yet another answer to this problem will help someone somewhere.
This appears to be specific to Windows 2008. Attaching to Windows Server 2016 works without the modified smb.conf file. I have been unable to locate any real details.
In case of problems with smbclient
you can mount smb folder and use it like local folder
mount -t cifs //<ip>/<share folder>$ /mnt -o user=<user>,pass=<password>,domain=<workdomain>
I simply can't find an answer to why this is happening when I am trying command line attempt to connect to gmail.
I am using sendEmail.exe in a bat file
-f xxxxxxxxxxxxxxxxxx#gmail.com -t xxxxxxxxxxxxx#gmail.com -s smtp.gmail.com:587 -xu xxxxxxxxxxxxxx#gmail.com -xp xxxxxxxxxxxxxxxxxx -u "Test Email" -m "Testing Windows Task Scheduler" -o tls=yes
It is the 'bad protocol tcp' part ia m not finding an answer anywhere.
This is happening only in one sytem. But working on another
I've had similar problems with other tools and the same purpose. Please, check you have enabled the less secure apps setting on your Google account.
I hope be useful!
I have configure ejabberd server 2.1.10 with mysql database integration,mod_admin_extra module and mod_xmlrpc module.
Issues is ejaberd admin commands like add_rosteritem, delete_rosteritem are notworking with xml_rpc.
When we use direct command line like,
*root#ejabberdserver:~# ejabberdctl add_rosteritem admin domain.com karthik domain.com karthik none both*
it will work and store in to database.
but same command does not work with xml_rpc.
xml_rpc does not return any error, it retun {ok,{response,[0]}}
But it does't store database.
Any permission issue?
Any body please help!!!!!
I meet the similar issue recently, and turn out the root cause was there a bug in (svn)ejabberd_module source code, and this was reported in https://github.com/processone/ejabberd-contrib/issues/22 and fixed in ejabberd-contrib,
So I suggest you download the source https://github.com/processone/ejabberd-contrib and rebuild the mod_admin_extra.
I have a batch file that calls "MSIExec /X {MyGUID} /qn". This runs successfully when run with my admin user. When I run it as a Window Batch command from a Hudson job it fails with "T�h�e� �i�n�s�t�a�l�l�a�t�i�o�n� �s�o�u�r�c�e� �f�o�r� �t�h�i�s� �p�r�o�d�u�c�t� �i�s� �n�o�t� �a�v�a�i�l�a�b�l�e�.� � �V�e�r�i�f�y� �t�h�a�t� �t�h�e� �s�o�u�r�c�e� �e�x�i�s�t�s� �a�n�d� �t�h�a�t� �y�o�u� �c�a�n� �a�c�c�e�s�s� �i�t�.�
"
I am inclined to think that the issue is that the job is started by the "anonymous" user rather than my admin user.
How in hudson do I "tie" the job to be run under the admin user?
Thanks in advance.
Regards,
Andrew
You have two options, the first one is, running Hudson under an Admin user (usually a bad idea) or use the runas command. To avoid entering a password you might need to use the /savecred option.
BTW, did you read the error message? Here is the readable version of it:
"The installation source for this
product is not available. Verify that
the source exists and that you can
access it. "