ubuntuusers.de

Nach update auf Ubunt 24.04 kein Root zugang mehr über ssh

Status: Gelöst | Ubuntu-Version: Ubuntu 24.04 (Noble Numbat)
Antworten |

weholei

Anmeldungsdatum:
7. Februar 2019

Beiträge: 761

Wohnort: Mittelfranken

Hallo ich habe ein Update des Desktops von Ubuntu 22.04 auf 24.04 gemacht

Kann mir jemand sagen, was ich machen muss damit ich wieder als root Zugang erhalte?

root@raspi4:~ $ ssh 192.168.2.40
Your account has expired; please contact your system administrator.
Connection closed by 192.168.2.40 port 1953

Danke

Moderiert von redknight:

Verschoben

tomtomtom Team-Icon

Supporter
Avatar von tomtomtom

Anmeldungsdatum:
22. August 2008

Beiträge: 55194

Wohnort: Berlin

Der Account muss aktiv sein und in der SSH-Konfiguration muss Rootlogin aktiviert sein.

Beides ist bei Ubuntu standardmäßig nicht der Fall.

Es fehlen hier also verwertbare Informationen, nämlich ob der Rootaccount aktiviert wurde und wie die SSH-Config aussieht.

weholei

(Themenstarter)

Anmeldungsdatum:
7. Februar 2019

Beiträge: 761

Wohnort: Mittelfranken

Dank für die Antwort

Damit kann ich dienen

root@ubu22-BW:/etc/ssh $ cat sshd_config

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

Include /etc/ssh/sshd_config.d/*.conf

Port xxxx
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m

#
#PermitRootLogin without-password

PermitRootLogin yes
#MaxAuthTries 6
#MaxSessions 10

PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile	.ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
KbdInteractiveAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the KbdInteractiveAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via KbdInteractiveAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and KbdInteractiveAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem	sftp	/usr/lib/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs server
root@ubu22-BW:/etc/ssh $ ^C

Es fehlen hier also verwertbare Informationen, nämlich ob der Rootaccount aktiviert wurde und wie die SSH-Config aussieht.

Den root account gibt es und es hat ja vorher funktioniert.

Außerdem glaube ich, beim Updaten angewiesen zu haben, die alten config zu behalten

Eigentlich wollte ich "nur" mal schnell die Backups von 2024 verschieben, tja

weholei

(Themenstarter)

Anmeldungsdatum:
7. Februar 2019

Beiträge: 761

Wohnort: Mittelfranken

Danke

Hab den Fehler gefunden

Hat mit Update nichts zu tun

Das root Passwort expired 31.12.2024

weholei

(Themenstarter)

Anmeldungsdatum:
7. Februar 2019

Beiträge: 761

Wohnort: Mittelfranken

sorry doppelpost

tomtomtom Team-Icon

Supporter
Avatar von tomtomtom

Anmeldungsdatum:
22. August 2008

Beiträge: 55194

Wohnort: Berlin

weholei schrieb:

Das root Passwort expired 31.12.2024

Ergo: Der Punkt ob der Rootaccount aktiv ist konnte verneint werden. 😉

Berlin_1946 Team-Icon

Supporter, Wikiteam

Anmeldungsdatum:
18. September 2009

Beiträge: 10111

weholei schrieb:

Hallo ich habe ein Update des Desktops von Ubuntu 22.04 auf 24.04 gemacht

Hast du nicht, sondern du hast ein upgrade gemacht.

weholei

(Themenstarter)

Anmeldungsdatum:
7. Februar 2019

Beiträge: 761

Wohnort: Mittelfranken

Ergo: Der Punkt ob der Rootaccount aktiv ist konnte verneint werden. 😉

root@ubu22-BW:/etc/ssh $ cat sshd_config

Den root account gibt es und es hat ja vorher funktioniert.

wieder was gelernt, nur über sudo -s

tomtomtom Team-Icon

Supporter
Avatar von tomtomtom

Anmeldungsdatum:
22. August 2008

Beiträge: 55194

Wohnort: Berlin

weholei schrieb:

Den root account gibt es und es hat ja vorher funktioniert.

Natürlich gibt es den. Der hat aber unter Ubuntu standardmäßig kein gültiges Passwort, so dass man sich nicht darin einloggen kann.

Also ist er standardmäßig nicht aktiv. Und war er bei dir auch nicht, da er ja kein gültiges Passwort hatte. 😈

Antworten |