Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: steever on February 25, 2007, 11:12:44 AM

Title: Add fragment to /etc/samba/smb.conf
Post by: steever on February 25, 2007, 11:12:44 AM
Hi Guys:

I'd like to add the line
Quote
hide files = /desktop.ini/ntuser.ini/NTUSER.*/
to the [profiles] share in /etc/samba/smb.conf to stop those annoying instances of desktop.ini popping up.

Can anybody help me do this through the templating system?

Thanks in advance.

Steve
Title: Add fragment to /etc/samba/smb.conf
Post by: meanpenguin on February 28, 2007, 05:16:33 AM
Copy the file

    /etc/e-smith/templates/etc/smb.conf/61Profilesshare

to

    /etc/e-smith/templates-custom/etc/smb.conf/61Profilesshare
 
Code: [Select]

mkdir -p /etc/e-smith/templates-custom/etc/smb.conf/
cp /etc/e-smith/templates/etc/smb.conf/61Profilesshare  /etc/e-smith/templates-custom/etc/smb.conf


edit the file and add the line you want

Then expand the template
Code: [Select]

/sbin/e-smith/expand-template /etc/smb.conf


Then it should all be done..

Ed
Title: Re: Add fragment to /etc/samba/smb.conf
Post by: tropicalview on March 21, 2008, 06:39:05 AM
Does this work???
if yes, i tried to implement it, but i got lost at the moment of:

Quote
edit the file and add the line you want

i do not know what file to edit i found these:
Code: [Select]
[root@admin-svr etc]# find / -name 'smb.conf'
/usr/share/doc/samba-3.0.25b/LDAP/smbldap-tools-0.9.2/smb.conf
/etc/samba/smb.conf
/etc/e-smith/templates/etc/smb.conf
/etc/e-smith/templates.metadata/etc/samba/smb.conf
/etc/e-smith/templates.metadata/etc/smb.conf
/etc/e-smith/templates-custom/etc/smb.conf
/etc/e-smith/events/post-upgrade/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/service-one/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/network-delete/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/network-create/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/workgroup-update/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/ibay-modify-servers/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/service-access/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/ibay-create/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/ibay-delete/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/bootstrap-console-save/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/console-save/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/post-install/templates2expand/etc/samba/smb.conf
/etc/e-smith/events/ibay-modify/templates2expand/etc/samba/smb.conf

what now?
Title: Re: Add fragment to /etc/samba/smb.conf
Post by: Marco Hess on March 21, 2008, 07:08:47 AM
i tried to implement it, but i got lost

Edit the file:

/etc/e-smith/templates-custom/etc/smb.conf/61Profilesshare

You'll find that towards to end it looks like the [Profiles] section you want to add your entry to.

Then execute:

/sbin/e-smith/expand-template /etc/smb.conf

and when you check /etc/smb.conf will now have the modification you made.

Cheers,

Marco
Title: Re: Add fragment to /etc/samba/smb.conf
Post by: bloodshoteye on March 21, 2008, 10:38:04 AM
meanpenguin

I've been looking for a way to do just this, so thanks for sharing with the community.
With your help and the original poster's help we can eliminate this sort of unwanted stuff.
Up to now I've been individually deleting the .ini file in the user's windows startup directory.
Title: Re: Add fragment to /etc/samba/smb.conf
Post by: cactus on March 21, 2008, 11:27:48 AM
Up to now I've been individually deleting the .ini file in the user's windows startup directory.
And if users would have reported this in the bugtracker the devs might have implemented this already or in the future. I took the liberty of reporting it as a bug 4082 (http://bugs.contribs.org/show_bug.cgi?id=4082).