简体   繁体   English

monetdb:关闭mclient上的密码

[英]monetdb: switch off password on mclient

I'd like to access monetdb database without password verification. 我想访问monetdb数据库而无需密码验证。 I need this to put code into bash script and automatize some queries. 我需要将代码放入bash脚本并自动执行一些查询。

Command 命令

mclient -u monetdb -d database

asks for password, which I'd like to omit (by default password is 'monetdb'). 要求输入我想忽略的密码(默认密码是“ monetdb”)。 After this command I'd like to enter the database. 执行此命令后,我想输入数据库。

If it's not feasible, maybe there is a chance to pass the password (even with direct and visible text in code). 如果不可行,则可能有机会通过密码(即使代码中包含直接和可见的文本)。

You can create a configuration file that contains your username and password. 您可以创建一个包含用户名和密码的配置文件。

Before mclient starts parsing command line options, it reads a .monetdb file. 在mclient开始分析命令行选项之前,它将读取一个.monetdb文件。 If the environment variable DOTMONETDBFILE is set, it reads the file pointed to by that variable instead. 如果设置了环境变量DOTMONETDBFILE,它将读取该变量指向的文件。 When unset, mclient searches for a .monetdb file in the current working directory, and if that doesn't exist, in the current user's home directory. 取消设置时,mclient在当前工作目录中搜索.monetdb文件,如果不存在,则在当前用户的主目录中搜索.monetdb文件。 This file can contain defaults for the flags user, password, language, save_history, format, and width. 该文件可以包含标志用户,密码,语言,save_history,格式和宽度的默认值。 For example, an entry in a .monetdb file that sets the default language for mclient to mal looks like this: language=mal. 例如,.monetdb文件中的一项将mclient的默认语言设置为mal的条目如下所示:language = mal。 To disable reading the .monetdb file, set the variable DOTMONETDBFILE to the empty string in the environment. 若要禁用读取.monetdb文件,请将变量DOTMONETDBFILE设置为环境中的空字符串。

Put this into your .monetdb file and you won't have to manually enter your username and password. 将其放入您的.monetdb文件,您将无需手动输入用户名和密码。

user=monetdb
password=monetdb

我的最低要求已达到众所周知的Expect命令

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM