WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Linux, UNIX, Open Source (http://www.wcm.at/forum/forumdisplay.php?f=13)
-   -   passwd automatisieren (http://www.wcm.at/forum/showthread.php?t=194806)

chrisne 06.07.2006 20:29

passwd automatisieren
 
hi,

gibt es eine möglichkeit passwd zu automatisieren?

ich möchte machen:
habe eine datei wo user altes pw und neues pw drinnen steht.
sepp hug0 neu
max mimi neu
franz lala neu

und das ganze jetzt per sh script das file durcharbeiten lassen und das pw auf "neu" setzen.

danke

Juro 07.07.2006 00:39

<insider>Na klar, ist ein perl Einzeiler (wirklich!). Frag einfach den Peter!</insider>

chrisne 07.07.2006 00:51

:p

xandl33 07.07.2006 10:33

müßte denk ich auch in einem shell skript gehen mit passwd befehl funktionieren, wobei du dann wahrscheinlich root rechte brauchen wirst um das pw der user zu änder n.

m@rio 07.07.2006 11:46

Re: passwd automatisieren
 
man usermod

MANX 07.07.2006 11:53

Hi!

Für den Anfang, das auslesen einer CVS Datei ist nicht wirklich schwer.

http://www.linuxforen.de/forums/show...22&postcount=5

Grüße

Manx

colossus 16.07.2006 11:13

Kommt stark auf die Distro an, wie aufwendig das ist. `passwd` von Red Hat z. B: kennt "--stdin" als Option, wo du einfach auf stdin das Passwort eines Users hin-`echo`-en kannst. Hab ich sonst aber noch nirgendwo gesehen.

Das Problem ist eigentlich nur der Salt fuer den Hash des Passworts. Mit einem einfachen md5-Hashwert ist's naemlich nicht getan auf einem System mit PAM, und dieses "-p PASSWORD as returned by crypt()" ist auch nicht mehr ernstzunehmen ;)

Weil wir grade dabei sind: Weisz jemand der Anwesenden, wie man an den jeweiligen Salt der Passwort-Hashes eines Systems kommt?

citizen428 22.07.2006 20:11

http://www.digitalpeer.com/id/understanding

und

"crypt(3) is the library function which is used to compute a password hash that can be used to store user account passwords while keeping them relatively secure. Technically the name is a misnomer since it is actually a cryptographic hash function. Traditionally it's been implemented using a simplified form of the DES algorithm. The user's password is truncated to eight characters, and those are coerced down to only 7-bits each; then a "salt" is randomly chosen and used to perturb these 56-bits into a DES key. That key is then used to "encrypt" a string of ASCII NUL characters, and the results are then encoded into a printable string (with the original "salt" also encoded and concatenated).

When a user attempts to authenticate, the password they propose is run through the same function (with the same "salt" ... now decoded). If the results from this purported password match that which is stored in the system then the user is presumed to have used the same password."
http://en.wikipedia.org/wiki/Crypt_(Unix)


Alle Zeitangaben in WEZ +2. Es ist jetzt 04:45 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag