Sambastatus: my first module for nethserver


(Enrique D) #103

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 (ipv4:  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 Wed Oct 10 09:14:15 AM 2018 MDT  -            -   


(Enrique D) #104

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:

/* 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";


/* 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

(Carlo Minucci) #105

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

(Carlo Minucci) #106

with your suggestion I found this solution:

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

(Enrique D) #107

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:

(Alessio Fattorini) #108

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

(Carlo Minucci) #109

New version with new UI is out!

Setting up a PDC on armhfp
(Mark Verlinde) #110

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:

(Carlo Minucci) #111

yes, everything is possible

but… monday :slight_smile:

(Carlo Minucci) #112

noarch package is ready.

“Your satisfaction is our best reward.”

(Mark Verlinde) #113

Did not do any testing (yet);

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


(Alessio Fattorini) #114

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

(Enrique D) #115

And the name of the film is … ?

(Carlo Minucci) #116

“Vieni avanti cretino”

(Enrique D) #117

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