Koozali.org: home of the SME Server

Add fragment to /etc/samba/smb.conf

Offline steever

  • *
  • 185
  • +0/-0
    • Open-Sesame
Add fragment to /etc/samba/smb.conf
« 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
Saving the world ... one server at a time.

Offline meanpenguin

  • ***
  • 138
  • +0/-0
Add fragment to /etc/samba/smb.conf
« Reply #1 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

Offline tropicalview

  • ****
  • 196
  • +0/-0
    • http://www.tropicalview.net
Re: Add fragment to /etc/samba/smb.conf
« Reply #2 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?
The sky is not the limit, But when I reach the sky, for sure I will not try to go to the limit.... (donated $25,- upto now)

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: Add fragment to /etc/samba/smb.conf
« Reply #3 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
Adelaide - Australia

Offline bloodshoteye

  • ****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Add fragment to /etc/samba/smb.conf
« Reply #4 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.
SME Server is a fantastic product - thank you!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Add fragment to /etc/samba/smb.conf
« Reply #5 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.
« Last Edit: March 21, 2008, 11:29:37 AM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)