Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[OT] scriptino cgi in bash
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
abaddon83
Guru
Guru


Joined: 17 Jan 2004
Posts: 494

PostPosted: Tue Apr 12, 2005 10:02 pm    Post subject: [OT] scriptino cgi in bash Reply with quote

scusate il tremendo ot, ma mi sono inchiodato allegramente e non so come venirne a capo :(

il mio progblema è il seguente:

sto creando uno scriptino cgi-bin che mi permetta di creare utenti ftp (server ftp pure-ftpd) tramite form html.

il form manda i dati allo script e lo script lo esegue, gli unici dati che mi interessano sono username e password e il problema nasce ora, il comando per creare un utente nel demone ftpd è il seguente:

Code:
[...]
pure-pw useradd ${QUERY[1]} -u ftpuser -d /home/ftp/${QUERY[1]}
[...]


dove ${QUERY[1]} indica il nome dell'utente e anche il nome della dir, il problema è che pure-pw useradd dopo essere stato eseguito richiede di inserire la pass 2 volte che sarebbe: ${QUERY[2]} come faccio a inserirla?

come faccio a far capire allo script che quando eseguo pure-pw appena esce la scritta Password deve inserire il valore di ${QUERY[2]}?

scusate ancora l'ot, ma mi sto tirando matto
_________________
Abaddon's House
Jabber account: abaddon@jabber.linux.it
Back to top
View user's profile Send private message
oRDeX
Veteran
Veteran


Joined: 19 Oct 2003
Posts: 1325
Location: Italy

PostPosted: Tue Apr 12, 2005 10:22 pm    Post subject: Reply with quote

eh..bel problema...pure-pw non ha un'opzione da passargli da riga di comando per la pass?
Back to top
View user's profile Send private message
abaddon83
Guru
Guru


Joined: 17 Jan 2004
Posts: 494

PostPosted: Tue Apr 12, 2005 10:33 pm    Post subject: Reply with quote

questo è l'help, a me non sembra pero' potrei sbagliarmi...

Quote:
pure-pw useradd <login> [-f <passwd file>] -u <uid> [-g <gid>]
-D/-d <home directory> [-c <gecos>]
[-t <download bandwidth>] [-T <upload bandwidth>]
[-n <max number of files>] [-N <max Mbytes>]
[-q <upload ratio>] [-Q <download ratio>]
[-r <allow client ip>/<mask>] [-R <deny client ip>/<mask>]
[-i <allow local ip>/<mask>] [-I <deny local ip>/<mask>]
[-y <max number of concurrent sessions>]
[-z <hhmm>-<hhmm>] [-m]

pure-pw usermod <login> -f <passwd file> -u <uid> [-g <gid>]
-D/-d <home directory> -[c <gecos>]
[-t <download bandwidth>] [-T <upload bandwidth>]
[-n <max number of files>] [-N <max Mbytes>]
[-q <upload ratio>] [-Q <download ratio>]
[-r <allow client ip>/<mask>] [-R <deny client ip>/<mask>]
[-i <allow local ip>/<mask>] [-I <deny local ip>/<mask>]
[-y <max number of concurrent sessions>]
[-z <hhmm>-<hhmm>] [-m]

pure-pw userdel <login> [-f <passwd file>] [-m]

pure-pw passwd <login> [-f <passwd file>] [-m]

pure-pw show <login> [-f <passwd file>]

pure-pw mkdb [<puredb database file> [-f <passwd file>]]

pure-pw list [-f <passwd file>]

-d <home directory> : chroot user (recommended)
-D <home directory> : don't chroot user
-<option> '' : set this option to unlimited
-m : also update the /etc/pureftpd.pdb database
For a 1:10 ratio, use -q 1 -Q 10
To allow access only between 9 am and 6 pm, use -z 0900-1800

_________________
Abaddon's House
Jabber account: abaddon@jabber.linux.it
Back to top
View user's profile Send private message
Dhaki
Guru
Guru


Joined: 16 Jun 2004
Posts: 325
Location: Ticino - CH

PostPosted: Wed Apr 13, 2005 6:10 am    Post subject: Reply with quote

Dai un occhiata anche a questo: https://forums.gentoo.org/viewtopic.php?t=247204
Back to top
View user's profile Send private message
abaddon83
Guru
Guru


Joined: 17 Jan 2004
Posts: 494

PostPosted: Wed Apr 13, 2005 7:08 am    Post subject: Reply with quote

grazie! sembra che sia proprio quello che interessa a me :) dopo lo provo, ora devo studiare -.- uff
_________________
Abaddon's House
Jabber account: abaddon@jabber.linux.it
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum