linuxmuster / linuxmuster-base7

Mangement scripts for linuxmuster.net V7
GNU General Public License v3.0
13 stars 8 forks source link

MAC-Check #93

Closed ni-kw closed 4 years ago

ni-kw commented 4 years ago

grafik WebUI saves the MAC-Address like this Import ends without an error.

Also the restarting servces Output shows "OK!" for the dhcp server grafik

But DHCP-Service is not running and can't start: grafik

grafik

kiarn commented 4 years ago

Hello @ni-kw,

I cannot reproduce this : I mean in the last versions of the webui the mac adresses are tested to follow the MAC notation with ":" only, and not with '-'.

Even if I try to write it directly in the file devices.csv, the webui shows an error by the save action.

Do you have the latest version of the webui ? Maybe a problem with the browser ?

ni-kw commented 4 years ago

Webui is not the latest release. I didn't think that is allready fixed ^^ Even the webui shows an error - can you start the import with linuxmuster-import-devices? I think the import-script have to filter the "-" too

I can not update that server to test the latest version of lmn-base at the moment - but can test it this evening.

HappyBasher commented 4 years ago

The complete value checking is done by sophomorix-device. So open an issue there, if mac addresses should be checked.

ni-kw commented 4 years ago

Ok, thanks. I let this issue open, the only thing left is that the import-scripts output is isc-dhcp-server.....OK! but it didn't really starts.

jeffbeck commented 4 years ago

Please do a sophomorix syntax check with:

sophomorix-device --dry-run (returns a json object with syntax check results)

Are there complaints about the MAC?

ni-kw commented 4 years ago

Yes:

root@server:~# sophomorix-device --dry-run
Command line::
Option verbose is a modifier option
Option json is a modifier option
Hmmh. do not know what to do with option info
* forcing info mode
Option combinations successfully checked
OK: SophomorixSchemaVersion 1 matches required Version 1
#### Reading /usr/share/sophomorix/devel/sophomorix.ini                   ####
Distro-check: Ubuntu 18.04 is OK
#### Reading /etc/samba/smb.conf                                          ####
#### Reading /usr/lib/linuxmuster-webui/etc/default-ui-permissions.ini    ####
#### Parsing: net conf list                                               ####
#### Asking domain passwordsettings from samba                            ####
#### Reading /usr/share/sophomorix/devel/master/sophomorix.conf.master    ####
#### Reading /etc/linuxmuster/sophomorix/sophomorix.conf                  ####
#### OK: default-school share exists                                      ####
#### OK: /etc/linuxmuster/sophomorix/default-school/school.conf           ####
#### Reading /usr/share/sophomorix/devel/master/school.conf.master        ####
#### Reading /etc/linuxmuster/sophomorix/default-school/school.conf       ####
#### Query AD for device (start)                                          ####
#### 216 Computers found in AD                                            ####
#### 28 sophomorix rooms/devicegroupes found in AD                        ####
#### 15 dnsZones found                                                    ####
#### 532 sophomorix dnsNodes found                                        ####
#### Sorting lists ...                                                    ####
#### Query AD for device (end)                                            ####
#### Reading /etc/linuxmuster/sophomorix/default-school/devices.csv       ####
invalid MAC address format: 3c-2c-30-3f-ab:19 at /usr/sbin/sophomorix-device line 1813.

I'm going to update the server to the latest verion and try it again. At the moment it's: linuxmuster-base7 7.0.45-0ubuntu0

jeffbeck commented 4 years ago

OK, also bricht sophomorix wegen der Fehlerhaften MAC ab

@ni-kw :

Please run sophomorix-device --dry-run again and tell us the return value:

echo $?

This should NOT be zero (0)

ni-kw commented 4 years ago

25

jeffbeck commented 4 years ago

OK, thats what I tested too.

@HappyBasher : please fix this: ONLY continue if the return value of sophomorix-device --dry-run is 0

jeffbeck commented 4 years ago

I use a perl module to test for a correct mac address. And the "-" delimiter is considered wrong syntax.

Is there any reason to allow "-" as a delimiter?

ni-kw commented 4 years ago

After Upgrade to latest version I can confirm:

So the only thing left to fix is the ".....OK!" But I think it's a long way you have to go to run into this issue. You can fix it if you like to, but (to me) it is not that important.

HappyBasher commented 4 years ago

The problem is that the return code of systemctl start isc-dhcp-server is always 0 whether or not the action was successful.

HappyBasher commented 4 years ago

MAC-Check is not an issue. False feedback after service restart is fixed.