Sambastatus: my first module for nethserver

module

(Carlo Minucci) #1

(sorry for my bad english)

hello to everyone

i made a no module for nethserver, it’s my first module then don’t be evil with me :slight_smile:

it’s very simple, it’s only a web interface for smbstatus command

this is a screenshot

you can download and test from http://minucci.net/nethserver/


Shared folders connection management UI
We Are NethServer - Community Overview - Nov 16
How involve more developers?
Excel reports files in read only mode after recovering from sleep
NethServer Guides Index
Shared folders connection management UI
(Alessio Fattorini) #2

Wow I love this attempt :slight_smile: :heart_eyes_cat:
How can we move forward? I’m not up to date on the last testing packages path @dev_team
How can we move this module straight to the forge?


(Davide Principi) #3

I uploaded it on nethforge-testing:

http://packages.nethserver.org/nethserver/6.8/nethforge-testing/x86_64/Packages/nethserver-sambastatus-0.1-1.x86_64.rpm

Thank you @gecco!

Further steps:

  • share a git repository with sources
  • send me your public RSA key for SSH
  • upload new RPM releases directly on NethForge
  • Fork comps-nethforge and open a PR to show it directly from Software Center

(Gabriel GHEORGHIU) #4

I just installed the Samba Status Module without issues.

The NS 7b2 is a new installation (only updates and Samba AD), so the Samba Status is empty.

Thank you @gecco !

Gabriel


(Carlo Minucci) #5

ok, i hope to make all this steps in this week


(Rob Bosch) #6

Hi @gecco
Thanks a LOT for this initiative. You can’t immagine how valuable these community initiatives are!. Even though it is a small module, it is absolutely an example for other members to follow your path.
Please also write something about how you developed it. For non devvers like me it might make things easier to understand how to start whenever trying to create a NethServer module ourselves.
You can be proud to be able to say you have a NethServer module that made it to the community repository!!


(Carlo Minucci) #7

i made it, but in italian language :slight_smile:
http://minucci.net/blog/849


(Rob Bosch) #8

If it were possible I would give you 10 likes! Thanks a LOT. This means a lot for our community.
If there are other modules you are thinking of that could be created by you or members of the community, please do share!


(Giovanni Bezicheri) #9

Congrats gecco!!


(Alessio Fattorini) #10

I plan to translate gecco’s post in English
@gecco could you add rpm part soon? it would be awesome.


(Douglas Noronha) #11

Good Job Bro!

Keep “Moduling” LoL


(Carlo Minucci) #12

http://minucci.net/blog/849


(Carlo Minucci) #13

another problem…

for add a new and fantastic feature on my module i try to make this

$command = “db accounts show domadmins”;
$admin = shell_exec($command);
echo “|” . $admin . “|”;

but don’t work
why?

if i put a php file in /tmp and then lauch it work

[root@server tmp]# cat prova.php

<?php $command = "db accounts show domadmins"; $admin = shell_exec($command); echo "|" . $admin . "|"; ?>

[root@server tmp]# php prova.php
|domadmins=group
Description=Domain Admins
Gid=503
Members=admin,minucci
Removable=no
|[root@server tmp]#

why?


(Davide Principi) #14

db is a privileged command: to execute it from the server-manager, run “sudo”!


(Carlo Minucci) #15

ok

there is another command, or trick, to found all user into the group domadmins?


(Davide Principi) #16

The Unix way:

getent group domadmins

The Nethgui way:

$module->getPlatform()->getDatabase('accounts')->getProp('domadmins', 'Members');

(Carlo Minucci) #17

thanks, i change my code. now is:

$command = “getent group domadmins | cut -d “:” -f4”;
/* thanks to @davidep */


(Carlo Minucci) #18

an exclusive preview of the new version of SambaStatus (now with italian translation)


(Gabriel GHEORGHIU) #19

:clap::clap::clap:


(Rob Bosch) #20

Absolutely great! Your little module becomes a project itself… I love it!