Seite 1 von 2

opsi-clonezilla mit anonymous login

Verfasst: 27 Jun 2016, 15:55
von djdodo
Hi!
Unsere NAS bietet auf cifs einen anonymous access.
opsi-clonezilla versucht aber immer mit IP\pcpatch zu mounten.
Das wird so nicht funktionieren.
Da ich mich mit python nicht so auskenne, komme ich mit Änderung der setup.py nicht klar.
Wie kann ich den mount dort eintragen?
Also share ist immer das Gleiche //ip/images.

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 01:15
von SisterOfMercy
Wouldn't it be easier to make a pcpatch account for non-anonymous access?

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 07:43
von djdodo
Nope. Other system write to that storage anonyously. I can either set it to anonymous access or to accounts.
And because the systems that drop their backups on that storage are numerous, I can't ensure I get everything set to an account.

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 08:40
von djdodo
Tried other storages with the pcpatch-user which is defined.
I use pcpatch/pcpatch both as user an password.
I always get an error 13 "Permission denied".
When mounting that share on the opsi-server, everything works fine.
So my guess is, that opsi-clonezilla is using another username or is providing the wrong username.
Thats why I wanted anyone to explain to me the setup.py-script to understand where it gets the credentials.

Thanks.

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 08:58
von dkoch
Bevor gemountet wird liegt eine Datei in /tmp/ mit namen cred? ( ? = pid vom python prozess ). Bei Fehler und Erfolg wird die allerdings sofort gelöscht.
Die kannst jetzt entweder schnell sein und die Datei ausgeben bevor der Fehler kommt oder du entfernst das os.remove(...) unterhalb von except in:

Code: Alles auswählen

        try:
                result = execute(u"%s %s %s %s" % (which('mount.cifs'), imageshare, mountpoint, optString))
                os.remove(credentialsfilename)
        except:
                os.remove(credentialsfilename)
                raise
Bei mir ist das in Zeile 206

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 09:08
von djdodo
Oki.
Allerdings hab ich noch die Frage, wie ich dann an die Datei rankomme.
Wie ist das lokale login im bootimage?

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 09:18
von djdodo
Ok. Konnte mich einloggen.
Ist das Passwort verschlüsselt????
Mit der Zeichenfolge kann ich so überhaupt nix anfangen.

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 09:22
von m.radtke
username: root
Password: linux123

Cheers
Mathias

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 09:30
von djdodo
Ok. passt soweit Alles!

Danke!

Re: opsi-clonezilla mit anonymous login

Verfasst: 28 Jun 2016, 09:36
von djdodo
Eins hab ich noch....
Wie kann ich im configed in den ProductProperties eine Variable eintragen, dass "imagefilename" immer der Rechnername ist?