Bug 15411 - samba gpo startup scripts dont work because of executive permissions
Summary: samba gpo startup scripts dont work because of executive permissions
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.18.3
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-01 07:15 UTC by john
Modified: 2023-07-01 07:15 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description john 2023-07-01 07:15:02 UTC
GPO startup scripts dont work, simply dont execute and i think i found the problem.

as i can see samba making in /etc/cron.d/ crontab file like this 
"@reboot root /var/cache/samba/gpo_cache/AD.CHGIK.RU/POLICIES/{F5036B7C-A872-4054-BCC0-52DCA8273F9A}/MACHINE/VGP/VTLA/UNIX/SCRIPTS/STARTUP/TEST.SH"

but downloaded file TEST.SH in client is without executive permissions.
ls -l /var/cache/samba/gpo_cache/AD.CHGIK.RU/POLICIES/{F5036B7C-A872-4054-BCC0-52DCA8273F9A}/MACHINE/VGP/VTLA/UNIX/SCRIPTS/STARTUP/TEST.SH

give me this 
-rw------- 1 root root 59 Jul  1 11:48 /var/cache/samba/gpo_cache/AD.CHGIK.RU/POLICIES/{F5036B7C-A872-4054-BCC0-52DCA8273F9A}/MACHINE/VGP/VTLA/UNIX/SCRIPTS/STARTUP/TEST.SH

if i make chmod +x in this file after samba-gpupdate --force then TEST.SH again without executive permissions.


 so cronjob cannot execute him. althogh in domain controller i maked this script with executive permissions using chmod +x test.sh downloaded file without this.