AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-900659

Jesper.Lindberg's questions

Martin Hope
Jesper.Lindberg
Asked: 2025-01-12 04:00:27 +0800 CST

openvpn persist-tun não está funcionando

  • 5

Eu configurei um cliente openvpn no servidor ubuntu, gostaria de ter sempre a interface ativa mesmo se a conexão falhar. Eu tentei isso com: persist-tunno meu arquivo .conf.

Entretanto, se eu executar , a interface não será mais exibida ?sudo systemctl stop openvpn@myconf.serivceifconfig

server
  • 1 respostas
  • 19 Views
Martin Hope
Jesper.Lindberg
Asked: 2020-11-04 23:46:01 +0800 CST

Posso executar métodos de interface DBus (org.freedekstop) no servidor ubuntu headless?

  • -1

Estou tentando mudar o sistema operacional para o CentOS, mas a instalação do CentOS usa o org.freedesktop.NetworkManager, que parece retornar muitos dispositivos de rede. Então, eu gostaria de tentar executar o org.freedesktop.NetworkManager.GetDevices()meu servidor ubuntu e ver o que ele retorna. Como posso fazer isso?

Em execução: servidor Ubuntu 18.4

server
  • 1 respostas
  • 194 Views
Martin Hope
Jesper.Lindberg
Asked: 2020-02-09 02:14:54 +0800 CST

Precisa de ajuda para restaurar um backup tar

  • 0

Consegui borde meu sudo... Tenho um backup do sistema que posso tentar restaurar. No entanto, como o sudo está quebrado, não posso substituir os arquivos protegidos.

Diretrizes que cansei de seguir ao fazer e restaurar o backup: https://help.ubuntu.com/community/BackupYourSystem/TAR

Basicamente eu quero correr

sudo tar -xvpzf /path/to/backup.tar.gz -C / --numeric-owner

O que gera:

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Alguma sugestão?

sudo data-recovery tar
  • 1 respostas
  • 41 Views
Martin Hope
Jesper.Lindberg
Asked: 2019-07-07 03:15:03 +0800 CST

Ubuntu mostra o menu de inicialização do grub e não inicializa automaticamente?

  • 1

Eu tenho o problema em que toda vez que inicializo meu laptop, ele mostra o menu de inicialização e tenho que escolher se quero usar o Ubuntu. Pesquisei na web e descobri que outros têm o mesmo problema, no entanto, as soluções que funcionaram para eles, onde definiram o temporizador para 0, não funcionam para mim.

O que eu tentei:

sudo nano /etc/default/grub
GRUB_TIMEOUT=0

Então eu corri sudo update-grub.

Eu ainda tenho o problema. Eu corro uma nova instalação do Ubuntu 18.04.2.

Este arquivo se parece com o seguinte:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=countdown
GRUB_TIMEOUT=0.1
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
grub2
  • 1 respostas
  • 1478 Views
Martin Hope
Jesper.Lindberg
Asked: 2019-03-09 01:52:54 +0800 CST

Como faço backup do meu sistema de arquivos com tar e multi-thread?

  • 1

Gostaria de fazer backup do meu sistema de arquivos e fazê-lo em paralelo. Encontrei este guia: https://help.ubuntu.com/community/BackupYourSystem/TAR Onde eles me dão o comando:

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system / 

Achei que deveria colocar -I pigzno início do comando, porém isso me dá o erro:

tar: Conflicting compression options

como isso pode ser resolvido?

backup tar multi-core
  • 1 respostas
  • 3128 Views
Martin Hope
Jesper.Lindberg
Asked: 2018-12-05 23:40:08 +0800 CST

Túnel SSH para navegar no host local, super lento

  • 0

Para visitar sites/serviços como notebooks jupyter e rstudio-server no meu servidor, eu faço um túnel ssh e depois navego neles no meu navegador da web na minha máquina local, porém, desde ontem, todos os meus serviços estão carregando muito devagar no meu navegador. Não tenho certeza por que ou por onde começar a solução de problemas. Eu posso ssh no servidor e olhar para o arquivo etc. Eu até tentei reinstalar um dos serviços ontem antes de perceber que todos os meus serviços estavam lentos ... Alguma ideia ou recomendação de como solucionar isso?

Editar: posso acrescentar que se eu conseguir me conectar a um serviço no navegador, parece que, uma vez conectado, o serviço é executado sem atrasos nos navegadores. Parece que é "apenas" a conexão que leva uma eternidade. (vários minutos) Também posso acrescentar que as portas estão abertas na minha máquina remota e local.

Só agora percebi que no meu terminal recebo a seguinte mensagem:

channel 3: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 4: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused

O comando que usei para abrir o túnel:

ssh -N -f -L 8787:localhost:8787 myNick@192.168.1.xx
server ssh
  • 1 respostas
  • 788 Views
Martin Hope
Jesper.Lindberg
Asked: 2018-12-02 05:56:23 +0800 CST

avisos do apt-get sobre o multiverso?

  • 3

Sempre que uso o apt-get update, recebo os seguintes avisos

W: Skipping acquire of configured file 'multiverse//binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' doesn't have the component 'multiverse/' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'multiverse//i18n/Translation-en' as repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' doesn't have the component 'multiverse/' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'multiverse//cnf/Commands-amd64' as repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' doesn't have the component 'multiverse/' (component misspelt in sources.list?)

Não tenho certeza se isso é algo com que devo me preocupar ou não? Pesquisei esses avisos no Google, mas não consigo encontrar ninguém que tenha o mesmo aviso, apenas o mesmo tipo de aviso.

O que há em /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu bionic main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu bionic-security main universe restricted m$
deb http://archive.ubuntu.com/ubuntu bionic-updates main universe restricted mu$
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/

Segundo comando: cat /etc/apt/sources.list | grep multiverse:

deb http://archive.ubuntu.com/ubuntu bionic main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu bionic-security main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main universe restricted multiverse/
server apt
  • 1 respostas
  • 574 Views
Martin Hope
Jesper.Lindberg
Asked: 2018-11-04 03:38:58 +0800 CST

Não é possível obter o serviço noip2 para iniciar na inicialização [duplicado]

  • 13
Esta pergunta já tem respostas aqui :
Como configuro o No-IP como um serviço adequado? (2 respostas)
Fechado há 3 anos .

Eu instalei ddns dinâmicos no-ip seguindo este guia: https://www.noip.com/support/knowledgebase/installing-the-linux-dynamic-update-client/

Eu faço o serviço rodar por

sudo /usr/local/bin/noip2

No entanto, quero que o serviço inicie na inicialização, tentei adicionar o seguinte script a /etc/init.d/noip2.sh

#######################################################
#! /bin/sh
# . /etc/rc.d/init.d/functions  # uncomment/modify for your killproc
case "$1" in
    start)
    echo "Starting noip2."
    /usr/local/bin/noip2
    ;;
    stop)
    echo -n "Shutting down noip2."
    killproc -TERM /usr/local/bin/noip2
    ;;
    *)
    echo "Usage: $0 {start|stop}"
    exit 1
esac
exit 0
#######################################################

Seguido por:

sudo chmod +x /etc/init.d/noip2.sh
sudo update-rc.d noip2.sh defaults

Agora devo ser capaz de iniciar o serviço com

sudo service noip2 start

Mas eu não sou. Quando executo journalctl -xerecebo o seguinte:

-- Unit noip2.service has begun starting up.
Nov 03 12:36:11 media systemd[3111]: noip2.service: Failed to execute command: Exec format error
Nov 03 12:36:11 media systemd[3111]: noip2.service: Failed at step EXEC spawning /etc/init.d/noip2.sh: Exec format error
-- Subject: Process /etc/init.d/noip2.sh could not be executed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The process /etc/init.d/noip2.sh could not be executed and failed.
--
-- The error number returned by this process is 8.
Nov 03 12:36:11 media systemd[1]: noip2.service: Control process exited, code=exited status=203
Nov 03 12:36:11 media systemd[1]: noip2.service: Failed with result 'exit-code'.
Nov 03 12:36:11 media systemd[1]: Failed to start noip2.service.
-- Subject: Unit noip2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

Informações atualizadas para o usuário PerDuck: Recebo os seguintes erros ao tentar sua solução... :( Tentei adicionar

RestartSec=30

Pelo menos continua tentando agora, mas ainda não inicia. Ainda posso iniciá-lo com sudo /usr/local/bin/noip2

Os erros:

Nov 03 23:26:42 media systemd[1]: noip2.service: Service hold-off time over, scheduling restart.
Nov 03 23:26:42 media systemd[1]: noip2.service: Scheduled restart job, restart counter is at 5.
Nov 03 23:26:42 media systemd[1]: Stopped noip2 service.
Nov 03 23:26:42 media systemd[1]: noip2.service: Start request repeated too quickly.
Nov 03 23:26:42 media systemd[1]: noip2.service: Failed with result 'start-limit-hit'.
Nov 03 23:26:42 media systemd[1]: Failed to start noip2 service.
server startup dns
  • 1 respostas
  • 19972 Views
Martin Hope
Jesper.Lindberg
Asked: 2018-11-04 02:49:29 +0800 CST

Problemas ao configurar o samba e conectar com o windows, "Você não pode acessar esta pasta compartilhada..."

  • 6

Eu tentei vários guias na internet tentando resolver esse problema que eu tenho. Eu instalei o samba no meu servidor Ubuntu 18.04.1. Eu adicionei a pasta compartilhada com as seguintes configurações:

#my shared folders
[ Backup ]
 comment = Backup
 path = /media/Backup
 browseable = yes
 read only = no
 valid users = MyUserName

No entanto, quando tento me conectar do Windows, não recebo solicitação para inserir minhas informações de login. Acabei de receber o erro que afirma: "Você não pode acessar esta pasta compartilhada porque as políticas de segurança da sua organização bloqueiam o acesso de convidados não autenticados. Essas políticas ajudam a proteger seu PC contra dispositivos inseguros ou mal-intencionados na rede."

Eu tentei adicionar estas linhas à minha configuração:

#Globala settings
[global]
admin users = MyUserName
security = user

Quando fiz isso, em vez de receber a mensagem de erro, agora recebo a mensagem de que meu computador Windows não pode se conectar ao endereço.

server samba
  • 1 respostas
  • 4417 Views
Martin Hope
Jesper.Lindberg
Asked: 2018-11-03 12:50:11 +0800 CST

Verifique se há vazamentos de DNS no servidor Ubuntu

  • 1

Atualmente, executo o servidor Ubuntu 18.04.1 LTS. Configurei a VPN de túnel dividido e parece funcionar bem, mas quero verificar se há vazamentos de DNS. Existe uma maneira de fazer isso com a linha de comando? Realmente não é possível abrir um navegador no servidor Ubuntu ...

Atualizado com informações para heynnema:

ls -al /etc/openvpn

total 52
drwxrwxrwx  4 root root  4096 Nov  2 21:32 .
drwxr-xr-x 99 root root  4096 Nov  3 12:40 ..
-rwxrwxrwx  1 root root  1403 Nov  2 20:35 ca.crt
drwxrwxrwx  2 root root  4096 Sep  5 14:43 client
-rwxrwxrwx  1 root root  1597 Nov  2 20:39 iptables.sh
-rwxrwxrwx  1 root root    18 Nov  2 20:36 login.txt
-rwxrwxrwx  1 root root   670 Nov  2 21:29 openvpn.conf
-rwxrwxrwx  1 root root   623 Nov  2 20:40 routing.sh
drwxrwxrwx  2 root root  4096 Sep  5 14:43 server
-rwxrwxrwx  1 root root   636 Nov  2 20:35 tls.key
-rwxrwxrwx  1 root root 11773 Nov 12  2017 update-systemd-resolved

#

grep -i hosts /etc/nsswitch.conf
hosts:          files resolve [!UNAVAIL=return] dns

# A seção "evitar vazamento de DNS" que obtive do guia on-line, no entanto, a VPN não funcionará para mim se eu habilitar esse comando.

up/down/down-pre
#up and down scripts to be executed when VPN starts or stops
up /etc/openvpn/iptables.sh
down /etc/openvpn/update-systemd-resolved
down-pre

# prevent DNS leakage
#dhcp-option DOMAIN-ROUTE .

Mais informações:

#! /bin/bash
# Niftiest Software – www.niftiestsoftware.com
# Modified version by HTPC Guides – www.htpcguides.com

export INTERFACE="tun0"
export VPNUSER="vpn"
export LOCALIP="192.168.1.10"
export NETIF="enp1s0"

# flushes all the iptables rules, if you have other rules to use then add them into the script
iptables -F -t nat
iptables -F -t mangle
iptables -F -t filter

# mark packets from $VPNUSER
iptables -t mangle -A OUTPUT -j CONNMARK --restore-mark
iptables -t mangle -A OUTPUT ! --dest $LOCALIP -m owner --uid-owner $VPNUSER -j MARK --set-mark 0x1
iptables -t mangle -A OUTPUT --dest $LOCALIP -p udp --dport 53 -m owner --uid-owner $VPNUSER -j MARK --set-mark 0x1
iptables -t mangle -A OUTPUT --dest $LOCALIP -p tcp --dport 53 -m owner --uid-owner $VPNUSER -j MARK --set-mark 0x1
iptables -t mangle -A OUTPUT ! --src $LOCALIP -j MARK --set-mark 0x1
iptables -t mangle -A OUTPUT -j CONNMARK --save-mark

# allow responses
iptables -A INPUT -i $INTERFACE -m conntrack --ctstate ESTABLISHED -j ACCEPT

# block everything incoming on $INTERFACE to prevent accidental exposing of ports
iptables -A INPUT -i $INTERFACE -j REJECT

# let $VPNUSER access lo and $INTERFACE
iptables -A OUTPUT -o lo -m owner --uid-owner $VPNUSER -j ACCEPT
iptables -A OUTPUT -o $INTERFACE -m owner --uid-owner $VPNUSER -j ACCEPT

# all packets on $INTERFACE needs to be masqueraded
iptables -t nat -A POSTROUTING -o $INTERFACE -j MASQUERADE

# reject connections from predator IP going over $NETIF
iptables -A OUTPUT ! --src $LOCALIP -o $NETIF -j REJECT

# Start routing script
/etc/openvpn/routing.sh

exit 0
networking server vpn dns openvpn
  • 2 respostas
  • 1459 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve