[Linux-Biella] autologin?
Remotes
webmaster a remotes.it
Ven 24 Lug 2009 14:38:30 CEST
Alle 14:35, venerdì 24 luglio 2009, leonardo buffa ha scritto:
> On Fri, 24 Jul 2009 14:30:05 +0200
>
> Remotes <webmaster a remotes.it> wrote:
> > vorrei far accedere l'utente "utente" con password "password" in
> > automatico all'avvio del pc... ho trovato questa guida:
>
> puoi anche farti un fake login che fa tutto in automatico:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
>
> #define DIM 8
> #define CONFFILE "/etc/auto.conf"
>
> int main() {
>
> FILE *F, *fopen();
> char username[DIM];
> if ((F = fopen(CONFFILE, "r")) == NULL)
> {
> printf("missing file: "CONFFILE"\n");
> exit(1);
> }
>
> F=fopen(CONFFILE,"r");
> fgets(username,DIM,F);
> fclose(F);
> printf("\"%s\"",username);
> execlp( "login", "login", "-f", username, 0);
> }
>
>
> ---
> in auto.conf metti lo username
uhm... ti ringrazio ma... qual è la grande differenza tra questo e l'altro?
--
42 times per hour...
--
Nicolò "Remotes" Lucia
Debian user
"the 449257th penguin"
sirremoz a gmail.com
remotes a jabber.linux.it
remotes a bilug.it
Maggiori informazioni sulla lista
Linux