🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #9967

Re: perl

#9967
From: Ignacio Arenaza
Date: Wed, 17 Apr 2002 20:14
36 lines
2341 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "kurtsik" == kurtsik  <merlinaztia*stopspam*@mixmail.com> writes:

    kurtsik> Mi problema es que no se como pasar los valores de las
    kurtsik> variables a las entradas de adduser y smbpasswd.  Podeis
    kurtsik> ayudarme?  Estoy empezando con esto de la programacion,
    kurtsik> asi que, por favor intentad adecuaros a mi nivel (o a mi
    kurtsik> falta de nivel mejor dicho ;-) ) Gracias

Hola Kurtsik,

En realidad es muy facil. Basta con que uses la funcion system(). Algo
como esto:

        system ("adduser --home $home $user");
        system ("smpasswd -b $user $password");

sera suficiente ($home, $pass, etc. son las variables de tu script
perl donde estaran los valores que quieres usar).

Saludos. I�aki.

- -- 
  Get PGP/GPG Keys at  http://www.escomposlinux.org/iarenaza/pgpkey.html
  I use free software / Yo uso software libre

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt and GPG

iD8DBQE8vdeLZXLnGT1HLgcRAuBbAJ9zILphYFQbt4Q3mt2UVEhpq9dLKgCdGz++
TqT8CkwmaOVGFWZwU/51Lek=
=/1K4
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <87lmbmkrqr.fsf@eb2ebu.ampr.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!213-98-91-117.uc.nombres.ttd.ES!not-for-mail
References: <a9kesv$3qfb5$1@ID-101278.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,29ec62e44dff8321
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-04-17 16:20:12 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!213-98-91-117.uc.nombres.ttd.ES!not-for-mail
From: Ignacio Arenaza <iarenaza@eb2ebu.ampr.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: perl
Date: 17 Apr 2002 22:14:04 +0200
Organization: Servidor NNTP de eb2ebu.ampr.org
Lines: 36
Sender: linuxero@62-36-172-191.dialup.uni2.es
Message-ID: <87lmbmkrqr.fsf@eb2ebu.ampr.org>
References: <a9kesv$3qfb5$1@ID-101278.news.dfncis.de>
NNTP-Posting-Host: 213-98-91-117.uc.nombres.ttd.es (213.98.91.117)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1019085611 4393460 213.98.91.117 (16 [63420])
X-Orig-Path: julieta.escomposlinux.org!antonio.escomposlinux.org!reboot.escomposlinux.org!news.audiolis.com!217.127.183.203!eriador.escomposlinux.org!eb2ebu.ampr.org!not-for-mail
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7