Auteur Topic: Changed the passwd file and lost root access to the NAS  (gelezen 3504 keer)

Dit onderwerp bevat een als beste antwoord gemarkeerd bericht. Klik hier om er direct naartoe te gaan.

Offline kenoro

  • Bedankjes
  • -Gegeven: 0
  • -Ontvangen: 0
  • Berichten: 1
Changed the passwd file and lost root access to the NAS
« Gepost op: 21 april 2019, 00:50:48 »
Hi,

I changed by mistake the passwd file,

from "root:/bin/ash" to "root:/sbin/nologin"

I was trying to change the root access of a user, but I didn't pay attention :(

now i dont have any root permissions any more, I can see the file with WinSCP but I can not edited.

Putty does not allow me to change to root with sudo -i and returns /sbin/nologin: command not found

Can I do any thing to repair the mistake?

Thank you
  • Mijn Synology: DS218play
  • HDD's: 2

Offline Briolet

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 176
  • -Ontvangen: 2619
  • Berichten: 16.241
Re: Changed the passwd file and lost root access to the NAS
« Reactie #1 Gepost op: 21 april 2019, 12:21:58 »
Engels? Daar bestaat een Engelstalig forum voor.
  • Mijn Synology: DS415+
  • HDD's: 3x 3TB in SHR
  • Extra's: DS212J (Backup)

Offline Birdy

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 1336
  • -Ontvangen: 7768
  • Berichten: 43.095
  • FIFO / LIFO
    • Truebase
Re: Changed the passwd file and lost root access to the NAS
« Reactie #2 Gepost op: 21 april 2019, 13:23:17 »
De enige mogelijkheid is om DSM opnieuw te installeren:
Modus 2: Synology NAS resetten en besturingssysteem DSM opnieuw installeren


CS406      DSM 2.0-0731    DS508      DSM 4.0-2265      DS411+II  DSM 6.2.4-25556-7   DS115J    DSM 7.1.1-42962-5   DS918+    DSM 6.2.4-25556-7
DS107+     DSM 3.1-1639    DS411slim  DSM 6.2.4-25556   DS213J    DSM 6.2.3-25426-2   DS1515+   DSM 6.2.4-25556-7   DS220+    DSM 7.2.1-69057-4
DS107+     DSM 3.1-1639    DS111      DSM 5.2-5967-9    DS413J    DSM 6.2.3-25426-2   DS716+II  DSM 6.2.4-25556-7   RT2600ac  SRM 1.2.5-8227-11
BeeDrive 1TB                                                                                                        MR2200ac  SRM 1.2.5-8227-11

Offline Briolet

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 176
  • -Ontvangen: 2619
  • Berichten: 16.241
Re: Changed the passwd file and lost root access to the NAS
« Reactie #3 Gepost op: 21 april 2019, 17:55:55 »
In het algemeen vind ik dat als iemand geen moeite wil doen voor het stellen van een fatsoenlijke vraag, hij/zij niet kan verwachten dat anderen moeite doen deze te beantwoorden.

Wat dat betreft is Birdy nog veel te netjes.  ;)
  • Mijn Synology: DS415+
  • HDD's: 3x 3TB in SHR
  • Extra's: DS212J (Backup)

Gemarkeerd als beste antwoord door Birdy Gepost op 22 april 2019, 12:20:00

Offline DSGebruiker

  • MVP
  • *
  • Bedankjes
  • -Gegeven: 5
  • -Ontvangen: 116
  • Berichten: 730
Re: Changed the passwd file and lost root access to the NAS
« Reactie #4 Gepost op: 21 april 2019, 18:19:18 »
Trouwens, je kan toch perfect de /etc/passwd edition dmv "sudo" ? Daar komt geen shell aan te pas normaal gezien. Sudo houd eigenlijk geen rekening met deze entry in /etc/passwd, behalve als je een poging doet de shell te launchen (vb sudo -i)

Probeer eens :
 :oops:
sudo vi /etc/passwd

zet je fout terug recht en saven maar.

Offline Birdy

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 1336
  • -Ontvangen: 7768
  • Berichten: 43.095
  • FIFO / LIFO
    • Truebase
Re: Changed the passwd file and lost root access to the NAS
« Reactie #5 Gepost op: 22 april 2019, 12:20:48 »
sudo vi /etc/passwd werkt idd (getest ;) )


CS406      DSM 2.0-0731    DS508      DSM 4.0-2265      DS411+II  DSM 6.2.4-25556-7   DS115J    DSM 7.1.1-42962-5   DS918+    DSM 6.2.4-25556-7
DS107+     DSM 3.1-1639    DS411slim  DSM 6.2.4-25556   DS213J    DSM 6.2.3-25426-2   DS1515+   DSM 6.2.4-25556-7   DS220+    DSM 7.2.1-69057-4
DS107+     DSM 3.1-1639    DS111      DSM 5.2-5967-9    DS413J    DSM 6.2.3-25426-2   DS716+II  DSM 6.2.4-25556-7   RT2600ac  SRM 1.2.5-8227-11
BeeDrive 1TB                                                                                                        MR2200ac  SRM 1.2.5-8227-11


 

"Newzbin Server Changed Protocol" op Sabnzbd+ en CouchPotato

Gestart door ypz801Board SABnzbd (usenet)

Reacties: 0
Gelezen: 1854
Laatste bericht 05 mei 2012, 11:21:04
door ypz801
NZBGet, Changed Paths

Gestart door MarkVBoard NZBGet

Reacties: 1
Gelezen: 1931
Laatste bericht 01 augustus 2013, 08:33:25
door MarkV
Melding: "The currently connected IP has been changed to xxx.xxx.xxx.xxx"

Gestart door J-JBoard Netwerk algemeen

Reacties: 0
Gelezen: 434
Laatste bericht 23 juli 2021, 21:44:28
door J-J
Veel meldingen System logs: external IP has been changed...

Gestart door 30rockstarBoard Synology DSM 5.1 en eerder

Reacties: 2
Gelezen: 2094
Laatste bericht 18 april 2014, 22:16:25
door 30rockstar
VERPLAATST: Changed the passwd file and lost root access to the NAS

Gestart door BirdyBoard FTP, NFS and Samba Server

Reacties: 0
Gelezen: 1307
Laatste bericht 21 april 2019, 13:30:35
door Birdy