Skip to content

Instantly share code, notes, and snippets.

@joseb0rges
Created January 12, 2019 22:38
Show Gist options
  • Save joseb0rges/d77ea1341870ce436f47d6ffed63feee to your computer and use it in GitHub Desktop.
Save joseb0rges/d77ea1341870ce436f47d6ffed63feee to your computer and use it in GitHub Desktop.
Change_Account - Zimbra .py
#!/usr/bin/env python
##
# Script Em pyhon
# Autor -> José Borges
##
import os
import csv
class Import:
def __init__(self,file):
self.__file = file
def ImportContas(self):
dataset = csv.reader(open(self.__file,'r'))
for data in dataset:
idlogin = data[0]
idloginnew = data[1]
os.system("su zimbra /opt/zabbix/bin/zmprov ra"+idlogin+" "+idloginnew)
I = Import('teste.csv')
I.ImportContas()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment