AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1097039

j4nd3r53n's questions

Martin Hope
j4nd3r53n
Asked: 2024-03-20 18:57:34 +0800 CST

如何删除不需要的电子邮件地址?

  • 5

更具体地说,我在 Debian 11 上使用 Firefox 115.8.0esr(64 位),有时需要通过电子邮件地址进行身份验证才能使用某些 Google 服务;由于某种原因 Firefox(或者是 Google?)会记住我不再使用的地址:

在此输入图像描述

有什么办法可以摆脱它们吗?或者它们可能在我可以操作的文件中?

firefox
  • 1 个回答
  • 13 Views
Martin Hope
j4nd3r53n
Asked: 2020-10-01 02:33:38 +0800 CST

让单个用户在没有 sudo 密码的情况下执行命令

  • 5

我已经搜索并找到了很多答案,但我仍然无法让它工作。这是在 debian 9 系统上 - 我在配置文件中创建了一个别名和一个 shell 函数:

alias lscron='sudo crontab -u biuser -l'

function edcron
{
  lckf=~biuser/edcron
  if [[ -f $lckf ]]
  then
    echo $(cat $lckf) is editing
  else
    echo $(id -nu) > $lckf
    sudo crontab -u biuser -e
    rm $lckf
  fi
}

它们按预期工作,但要求输入密码。我想让一些用户无需密码即可运行这些命令,所以我添加了如下内容/etc/sudoers:

analytics root = cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

some.user ALL = NOPASSWD: /usr/bin/crontab -u biuser -e, /usr/bin/crontab -u biuser -l

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

我没有收到任何错误,但它要求输入密码;我如何让它工作?

编辑

Matching Defaults entries for some.user on analytics:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User some.user may run the following commands on analytics:
    (ALL : ALL) ALL
    (root) NOPASSWD: /usr/bin/crontab -u biuser -e, /usr/bin/crontab -u biuser -l
    (ALL : ALL) ALL
sudo sudoers
  • 1 个回答
  • 164 Views
Martin Hope
j4nd3r53n
Asked: 2019-10-22 06:33:03 +0800 CST

git clone 作为 EC2 实例自动配置的一部分?

  • 5

我正在使用 Terraform 设置 EC2 实例,在此过程中我需要运行一个大型脚本。我想从我们的 gitlab 存储库下载脚本,例如:

git clone git@gitlab.something.org:a_name/project.git
Cloning into 'project'...
The authenticity of host 'gitlab.something.org (12.34.56.78)' can't be established.
ECDSA key fingerprint is SHA256:....
Are you sure you want to continue connecting (yes/no)? yes
Cloning into ...

当我从命令行运行它时,我必须确认,但这在我的情况下是不可能的。

但是在/var/log/cloud-init-output.log我看到这个(在上传了正确的私钥之后):

Cloning into 'project'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我希望这个错误只是没有回答“是”的结果 - 有没有办法告诉 git 它没关系,我知道我在做什么,然后继续它?

git amazon-web-services
  • 1 个回答
  • 439 Views
Martin Hope
j4nd3r53n
Asked: 2019-10-04 00:00:07 +0800 CST

上传文件作为使用 ssh 登录的一部分?

  • 5

有些人可能会发现这个问题非常奇特(而且很可能是不可能的):是否可以在我登录的同时以某种方式上传文件?就像是:

$ ssh --some-option /file/to/be/uploaded user@server

就像首先使用scp上传文件,然后登录,但只提供一次密码。问题是,我总是必须这样做(不要问,只是不要......)

或者,有没有办法将几个 ssh-family 命令“捆绑”在一起,所以你只需要提供一次密码(我知道使用私钥/公钥——这不是我想要的)?

编辑 1

不完全重复:结果与以下内容(我必须使用)冲突:

eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa

如果我使用连接共享,它似乎会禁用 ssh-agent 所做的任何事情。有办法解决吗?

编辑 2

我做了以下修改:

$ cat .profile
...
function ssh
{
  h=$1
  /usr/bin/scp ~/mybashrc $h:.bashrc
  /usr/bin/scp ~/.vimrc $h:.vimrc
  /usr/bin/ssh $h
}

eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa

和:

$ cat ~/.ssh/config
...
Host *
        ForwardAgent yes
        User myuser
        IdentityFile ~/.ssh/id_rsa
        ControlPath ~/.ssh/S.%r@%h:%p
        ControlMaster auto
        ControlPersist yes

如果没有这些Control*选项,我可以登录堡垒服务器,然后登录该网络中的其他服务器,但是当我添加选项时,我得到以下信息:

$ ssh rgs-gameiom
mybashrc             100%  177    18.0KB/s   00:00
.vimrc               100%   59     3.5KB/s   00:00
Last login: Thu Oct  3 08:35:38 2019 from 80.229.227.116
$ ssh db3
Permission denied (publickey).
ssh
  • 1 个回答
  • 86 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve