Tags:
, view all tags
-- AlessandroPaolini - 2011-02-03

/opt/glite/sbin/voms-admin-configure install --vo catchall --port 15018 --dbapwd segreto --verbose --cert /etc/grid-security/hostcert.pem --key /etc/grid-security/hostkey.pem --certdir /etc/grid-security/certificates/ --smtp-host iris.cnaf.infn.it --mail-from catchall-mng@infn.it --admincert paolini_usercert.pem


quando si cambia il certificato del voms, nella acl rimane in memoria quello vecchio, cos� ci sono problemi con i comandi voms-admin
lanciare questo:

# /opt/glite/share/voms-admin/Database.sh egrid add-global-admin "/C=IT/O=INFN/OU=Host/L=CNAF/CN=voms.cnaf.infn.it" "/C=IT/O=INFN/CN=INFN CA"

per aggiungere utenti ed assegnare un ruolo:

voms-admin --vo enea create-user paolini_newcert.pem assign-role VO VO-Admin paolini_newcert.pem

per modificare il contenuto di pagine web sul voms, bisogna creare cose opportune sotto /var/glite/etc/voms-admin/
ad esempio per inserire il link del VO_USAGE_RULES per la VO lights.infn.it bisogna creare le directories ed il file
(/var/glite/etc/voms-admin/lights.infn.it/)web/request/user/create.pp

con

[root@voms2 lights.infn.it]# less web/request/user/create.pp
<html>
<body>
<b>
<p>Read LCG Acceptable Usage Rules at this link</p>
<p align="justify"><a color="violet" href="https://edms.cern.ch/file/428036/3/Grid_AUP.pdf">VO USAGE RULES</a>
</p>
<p>Fill all fields below</p>
<p>and click on the proper button at the bottom of the page</p>
</b>
</body>
</html>




per ammazzare processi multipli rapidamente

for i in `ps ax|grep ftpd|awk '{print $1}'` ;do echo "killing " $i ; kill -9 $i; done


sul CE in /opt/edg/var/info/ ci sono per ogni VO i software TAG delle applicazioni installate

per fare un dump di un database mysql, lanciare:
mysqldump --databases voms_computer_it -p > computer_it_dump.sql

per ripristinarlo: mysql -uroot -p -D voms_cdf < cdf_dump.sql

eseguinre un comando mysql al volo:
mysql -uroot -psegreto -e "use voms_tps_infn_it; select * from admins;" | sed 's/.*C=//g'|sort > ordine-tps.txt


633 mysql -p -e "grant super, reload , replication slave, replication client on (asterisco).(asterisco) to segreto@'voms-02.pd.infn.it' identified by 'segreto'" ;
634 less /etc/my.cnf
635 mysql -p -e "grant select, lock tables on voms_euchina.* to segreto@'voms-02.pd.infn.it'"
636 mysql -p -e "grant select, lock tables on voms_euchina.* to segreto@'voms-02.pd.infn.it'"
637 mysql -p -e "grant select, lock tables on voms_cyclops.* to segreto@'voms-02.pd.infn.it'"
638 mysql -p -e "grant select, lock tables on voms_enmr_eu.* to segreto@'voms-02.pd.infn.it'"
639 mysql -p -e "grant select, lock tables on voms_euindia.* to segreto@'voms-02.pd.infn.it'"
640 mysql -p -e "grant select, lock tables on voms_eumed.* to segreto@'voms-02.pd.infn.it'"
641 mysql -p -e "grant select, lock tables on voms_lights_infn_.* to segreto@'voms-02.pd.infn.it'"
642 mysql -p -e "grant select, lock tables on voms_compassit.* to segreto@'voms-02.pd.infn.it'"
mysql -p -e "grant select, lock tables on voms_tps_infn_it.* to segreto@'voms-02.pd.infn.it'"

per cancellare dall'lfc le informazioni sulle repliche su di un certo SE:
mysql -p -e "use cns_db; select * from Cns_file_replica where host = 'se.grid.unipg.it';"
mysql> delete from Cns_file_replica where host = 'gridit002.pd.infn.it';


[root@oldlfcserver root]# less cancella-entry.sh
#!/bin/bash
for i in `cat sfn-perugia.txt`
do
mysql -psegreto -e "use cns_db; delete from Cns_file_replica where sfn = $i ;"
done
exit 0

per modificare il dato in una colonna di una tabella:
mysql> UPDATE usr SET cauri=NULL WHERE userid=81;

per recuperare da pacere delle chiavi vecchie, lanciare:
select aes_decrypt(hostkey,'1lc@n3'),aes_decrypt(hostcrt,'1lc@n3') from oldcrt where host='voms2';

per agire sul DB di ICE:

sqlite3 /var/glite/ice/persist_dir/ice.db

delete from jobs where user_dn like '<DN>' (oppure userdn)
delete from event_id where user_dn like.....
delete from proxy where userdn like ...
delete from delegation where userdn like ....
occhio che potresti avere il nome del campo userdn scritto in qualche modo diverso
perche' io ho sotto mano il codice piu' recente
ma la sostanza e' quella
questo dovrebbe resettare ogni info legata a quell'utente dentro ICE

Edit | Attach | PDF | History: r3 < r2 < r1 | Backlinks | Raw View | More topic actions...
Topic revision: r2 - 2011-03-30 - AlessandroPaolini
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback