[Samba] long scripts

Rob Campbell robcampbell08105 at gmail.com
Tue Nov 22 16:19:29 UTC 2022


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In all things, Be Intentional.


On Fri, Oct 14, 2022 at 10:47 AM David Mulder via samba <
samba at lists.samba.org> wrote:

> On 10/14/22 8:21 AM, Peter Carlson via samba wrote:
> > This is only partly a samba question and more a AD/GPO question
> >
> > I would like to have it setup via GPO that users when logging into
> > windows run login.ps1 and when logging in to linux run login.sh
> >
> > I have found one solution requiring python to be installed and using
> > one python script to detect the os and then re-act appropriately.
> > However I dont want to install python on windows computers. I was
> > thinking something like if computer in Linux Servers logon script =
> > login.sh otherwise logon script = login.ps1, but I'm not quite sure
> > how to best do this.  Maybe there is already a wiki on this that I
> > can't find?
> >
> >
> You could use Samba's client group policy for the linux client:
>
> https://wiki.samba.org/index.php/Group_Policy#Startup_Script_Policies
> https://wiki.samba.org/index.php/Group_Policy#Script_Policies
>
> Only works if you enable it on the client also:
>
> https://wiki.samba.org/index.php/Group_Policy#Winbind


I hope I didn't break protocol but responding to the last message in this
thread wouldn't allow me to respond to this section that I'm having a
problem with.

$ samba-tool gpo manage scripts startup add
{31B2F340-016D-11D2-945F-00C04FB984F9} login.sh '-n'


*samba-tool gpo: no such subcommand: manage*
Usage: samba-tool gpo <subcommand>

Group Policy Object (GPO) management.


Options:
  -h, --help  show this help message and exit


Available subcommands:
  aclcheck        - Check all GPOs have matching LDAP and DS ACLs.
  admxload        - Loads samba admx files to sysvol
  backup          - Backup a GPO.
  create          - Create an empty GPO.
  del             - Delete a GPO.
  dellink         - Delete GPO link from a container.
  fetch           - Download a GPO.
  getinheritance  - Get inheritance flag for a container.
  getlink         - List GPO Links for a container.
  list            - List GPOs for an account.
  listall         - List all GPOs.
  listcontainers  - List all linked containers for a GPO.
  restore         - Restore a GPO to a new container.
  setinheritance  - Set inheritance flag on a container.
  setlink         - Add or update a GPO link to a container.
  show            - Show information for a GPO.
For more help on a specific subcommand, please type: samba-tool gpo
<subcommand> (-h|--help)


>
>
> --
> David Mulder
> Labs Software Engineer, Samba
> SUSE
> 1221 S Valley Grove Way, Suite 500
> Pleasant Grove, UT 84062
> (P)+1 385.208.2989
> dmulder at suse.com
> http://www.suse.com
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list