|
|
|
@ -1305,31 +1305,19 @@ class servUnix(shareLdap):
|
|
|
|
|
if not self.isServiceSetup("unix"):
|
|
|
|
|
return False
|
|
|
|
|
# Если группа существует выходим без ошибки
|
|
|
|
|
flagErrGrExist = True
|
|
|
|
|
flagSearchGroups = True
|
|
|
|
|
if options.has_key('f'):
|
|
|
|
|
flagErrGrExist = False
|
|
|
|
|
if self.searchGroupGroupName(groupName):
|
|
|
|
|
if flagErrGrExist:
|
|
|
|
|
self.printERROR(\
|
|
|
|
|
flagSearchGroups = False
|
|
|
|
|
if flagSearchGroups and self.searchGroupGroupName(groupName):
|
|
|
|
|
self.printERROR(\
|
|
|
|
|
_("group name %s is found in") % str(groupName) +\
|
|
|
|
|
" /etc/group ...")
|
|
|
|
|
return False
|
|
|
|
|
else:
|
|
|
|
|
self.printSUCCESS(\
|
|
|
|
|
_("group name %s is found in") % str(groupName) +\
|
|
|
|
|
" /etc/group ...")
|
|
|
|
|
return True
|
|
|
|
|
if self.searchUnixGroupName(groupName):
|
|
|
|
|
if flagErrGrExist:
|
|
|
|
|
self.printERROR(\
|
|
|
|
|
_("group name %s is found in Unix service") %\
|
|
|
|
|
str(groupName) + " ...")
|
|
|
|
|
return False
|
|
|
|
|
else:
|
|
|
|
|
self.printSUCCESS(\
|
|
|
|
|
self.printERROR(\
|
|
|
|
|
_("group name %s is found in Unix service") %\
|
|
|
|
|
str(groupName) + " ...")
|
|
|
|
|
return True
|
|
|
|
|
return False
|
|
|
|
|
self.clVars.Set("ur_group",groupName)
|
|
|
|
|
# номер группы
|
|
|
|
|
gid = str(self.getMaxGid())
|
|
|
|
@ -5263,8 +5251,7 @@ class cl_ldap(shareLdap):
|
|
|
|
|
'shortOption':"f",
|
|
|
|
|
'longOption':"force",
|
|
|
|
|
'helpChapter':_("Unix service options"),
|
|
|
|
|
'help':_("force exit with success status") + " " +\
|
|
|
|
|
_("if the specified group already exists")
|
|
|
|
|
'help':_("does not read /etc/group")
|
|
|
|
|
},
|
|
|
|
|
{'progAccess':(0,),
|
|
|
|
|
'shortOption':"g",
|
|
|
|
@ -5311,8 +5298,7 @@ class cl_ldap(shareLdap):
|
|
|
|
|
'shortOption':"f",
|
|
|
|
|
'longOption':"force",
|
|
|
|
|
'helpChapter':_("Samba service options"),
|
|
|
|
|
'help':_("force exit with success status") + " " +\
|
|
|
|
|
_("if the specified group already exists")
|
|
|
|
|
'help':_("does not read /etc/group")
|
|
|
|
|
},
|
|
|
|
|
{'progAccess':(0,),
|
|
|
|
|
'shortOption':"g",
|
|
|
|
|