LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to Send halt signal to XP SAMBA client (https://www.linuxquestions.org/questions/linux-networking-3/how-to-send-halt-signal-to-xp-samba-client-452384/)

Serendipity0404 06-07-2006 07:54 AM

How to Send halt signal to XP SAMBA client
 
Hello!

I am runnign samba as pdc (on a debian sarge server) and have 8 XP pro clients which connect to the server. So far everythibg going dandy, but my students cant be bothered with turning off the pc when they are finished.

I need a script to shut down all the XPs @ say 21h every day. I imagine it might be a bash script, which I can then automate with a cron job.

My problem is I dont know how to reach the XP clients. They all got machine SMB accounts and static IPs, but thats as much as I know. Do I send a SIGTERM -15 to a specific service or ????



See my smb.conf file below.
Code:

# Global parameters
[global]
        workgroup = PHONETIKLABOR
        server string = %h server (Samba %v)
        map to guest = Bad User
        obey pam restrictions = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
        load printers = No
        add machine script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
        logon script = logon.bat
        logon drive = H:
        domain logons = Yes
        os level = 65
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        ldap ssl = no
        panic action = /usr/share/samba/panic-action %d
        comment = All Printers
        path = /tmp
        admin users = root
        read only = No
        printable = Yes
        veto files = /*.eml/*.nws/riched20.dll/*.{*}/
        browseable = No

[netlogon]
        comment =
        path = /home/netlogon
        write list = anais
        read only = Yes
        guest ok = Yes
        printable = No

[homes]
        comment = home directories
        path =
        valid users = %S
        create mask = 0600
        directory mask = 0700
        printable = No
        browseable = Yes

[projekt]
        comment = Arbeitsdaten
        path = /projekt
        write list = @forscher
        force group = forscher
        read only = Yes
        create mask = 0660
        directory mask = 0770
        printable = No
        browseable = Yes

[webserver]
        comment = webserver document root
        path = /var/www
        write list = @forscher
        force group = forscher
        read only = Yes
        create mask = 0660
        directory mask = 0770
        printable = No
        browseable = Yes

Any tip and hint is highly appreciated.

Regards: SRDPTY

EvilC0P 06-07-2006 09:04 AM

what you could do is a .bat that you would schedule at whatever time you want on every machine to execute : shutdown -s -t 5 -m

i use this to shutdown any machines at work .. cuz im lazy and dont want to get up :P
shutdown -s -t 5 -m \\MachineName

but from Linux, not sure that would work since it's a dos command. ;/ so maybe setting up a schedule task with the .bat file would fix this annoying situation.


All times are GMT -5. The time now is 11:42 PM.