Ejemplo n.º 1
0
 def addUser(self, username='', password='', admin=False):
     # default is not admin
     if admin:
         return BASESSHV2.addUser(
             self,
             username=username,
             password=password,
             addCommand=
             'user {username} password {password} role network-admin\n')
     else:
         return BASESSHV2.addUser(
             self,
             username=username,
             password=password,
             addCommand='user {username} password {password} role priv-1\n')
Ejemplo n.º 2
0
 def changePassword(self, username='', password=''):
     return BASESSHV2.addUser(
         self,
         username=username,
         password=password,
         addCommand=
         'user {username} password {password} role network-admin\n')
Ejemplo n.º 3
0
 def changePassword(self, username='', password=''):
     return BASESSHV2.addUser(
         self,
         username=username,
         password=password,
         addCommand='username {username} secret {password}\n')
Ejemplo n.º 4
0
 def addUser(self,username = '',password = ''):
         return BASESSHV2.addUser(self,username = username,password = password,addCommand = 'username {username} password {password}\n')