Sambastatus: my first module for nethserver

I don’t think so, I edited them too.

After Remove then Install it works!

I wonder if is possible (using the PID) to JOIN the information in the “Locked Files” tab/script to know what users locks each file.

Something like this: (New field is “User”)

User	Active Share	File Name	Date
user1@avion.lan	/ibay/setup	Windows-Change-Password/usb140201-Offline Windows pw & reg-editor, bootdisk.pdf	Wed Oct 10 09:14:19 2018
user1@avion.lan	/ibay/sistemas	.	Wed Oct 10 09:14:19 2018
user1@avion.lan	/ibay/setup	.	

# smbstatus -b|grep 32384
32384   user1@avion.lan domain users@avion.lan 192.168.22.23 (ipv4:192.168.22.23:61472)  SMB3_02           -                    partial(AES-128-CMAC)

# smbstatus -L|grep 32384
32384        0          DENY_WRITE 0x120089    RDONLY     LEASE(RWH)       /var/lib/nethserver/ibay/setup   Windows-Change-Password/usb140201-Offline Windows pw & reg-editor, bootdisk.pdf   Wed Oct 10 09:14:19 2018
32384        0          DENY_NONE  0x100080    RDONLY     NONE             /var/lib/nethserver/ibay/setup   .   Wed Oct 10 09:14:15 2018

# smbstatus -S|grep 32384
setup        32384   192.168.22.23 Wed Oct 10 09:14:15 AM 2018 MDT  -            -   

Regards!

1 Like

I tweak a little this scripts so the information looks a little more tidy for me.
Before (Active Connections):

After (Active Connections & Share), the headers on the table are left aligned.


The changes are:
Connections.php

/* ORIGINAL echo "<tr><th>" . $T('Username') . "</th><th>" . $T('IPAddress') . "</th></tr><thead><tbody>\n"; */
echo "<tr><td><b>" . $T('Username') . "</b></td><td><b>" . $T('IPAddress') . "</b></td><thead><tbody>\n";

Share.php

/* echo "<tr><th>" . $T('Share') . "</th><th>" . $T('Hostname') . "</th><th>" . $T('Date') . "</th><thead><tbody>\n"; */
echo "<tr><td><b>" . $T('Share') . "</b></td><td><b>" . $T('Hostname') . "</b></td><td><b>" . $T('Date') . "</b></td><thead><tbody>\n";

Based on “File.php” that is more readable:

Hope this likes to you all. Regards

3 Likes

@mre thanks for the suggestions. I start to work!

1 Like

with your suggestion I found this solution:

i thinks is better and more light (with only two .php files)

2 Likes

We still have the “Machines Joined Domain” tab, right? is very useful to me :slight_smile:

EDIT: Opps, I can’t read Italian; I see the 2nd tab in your image is the same “Macchine aggiunte al dominio”, sorry my bad :upside_down_face:

2 Likes

Ehi great job here. I love to see you guys improving the module.
@gecco looks like your module is really attractive

1 Like

http://minucci.net/nethserver/nethserver-sambastatus-7.1-0.x86_64.rpm

New version with new UI is out!

6 Likes

Lets ask @gecco if it is possible to package his great work as a noarch.
I would love to be able to test nethserver-sambastatus on arm architectures too :grinning:

5 Likes

yes, everything is possible

but… monday :slight_smile:

4 Likes

http://minucci.net/nethserver/nethserver-sambastatus-7.1-0.noarch.rpm

noarch package is ready.


“Your satisfaction is our best reward.”

7 Likes

Did not do any testing (yet);

Just a heads up: installs fine on armhfp (arm-32bit) without errors in the logs. :+1:

Thanx!

5 Likes

I guess non-italian people don’t know this film but you’re a genius :smiley:
Translation included :heart_eyes::heart_eyes:

1 Like

And the name of the film is … ?

“Vieni avanti cretino” https://www.youtube.com/watch?v=m12dq5U-jYQ

“Come on idiot/Vamos idiota” :grinning:
Now, I need to see it.

4 Likes

New features with version 7.2.0!!!

sambastatus02

Now you can see the name of the host, not only ip address. This process is a little slow and, in don’t know why, don’t work with all client. (Somebody can explain me why?)

In the new tab you can see the last login date of the user and found how many user have never logged in.This function is usefull for me.

Url of package: http://minucci.net/nethserver/nethserver-sambastatus-7.2-0.noarch.rpm
Url of my repository: http://minucci.net/nethserver/

4 Likes

Version 7.3-1 is out!!!

Screenshot with new features:


As usual you can find new package here: http://minucci.net/nethserver/nethserver-sambastatus-7.3-1.noarch.rpm

Repository: http://minucci.net/nethserver/

11 Likes

Great! The module deserves a place among the modules listed in the wiki. Took the liberty to create a new page for it, hope it’s fine with you. Let me know if you spot any error:

https://wiki.nethserver.org/doku.php?id=module:sambastatus

4 Likes

Hi @gecco, thanx again!

I’m testing on arm32 (the not jet released 7.6.1810) so it can be the next is due to the experimental status of the arm install. However I get these messages in journtalctl whenever I load the SambaSatus page:

... sudo[18913]: pam_unix(sudo:auth): conversation failed
... sudo[18913]: pam_unix(sudo:auth): auth could not identify password for [srvmgr]
... sudo[18913]: pam_succeed_if(sudo:auth): requirement "uid >= 1000" not met by user "srvmgr"
... sudo[18913]:   srvmgr : command not allowed ; TTY=unknown ; PWD=/usr/share/nethesis/nethserver-manager ; USER=root ; COMMAND=smbstatus -b
... sudo[18926]: pam_unix(sudo:auth): conversation failed
... sudo[18926]: pam_unix(sudo:auth): auth could not identify password for [srvmgr]
... sudo[18926]: pam_succeed_if(sudo:auth): requirement "uid >= 1000" not met by user "srvmgr"
... sudo[18926]:   srvmgr : command not allowed ; TTY=unknown ; PWD=/usr/share/nethesis/nethserver-manager ; USER=root ; COMMAND=smbstatus -L

Just an minor suggestion from my side:
IMHO it would look cleaner is the module would show up as Samba status instead of SambaStatus .
This because this is more inline with the other names like Domain accounts and Users and groups . Not a Big deal, just a suggestion! (hope it is understandable what i mean… )

afbeelding

EDIT: (opened PR which you can ignore)
afbeelding

2 Likes