editing smb.conf (INI files)



Anyone using Samba here? Or knows how an INI-file structure looks like?


What would you use to parse smb.conf or INI-files in a somehow automated/scripted manner?


Let's say this is a part of smb.conf:

[homes]
valid users = user1, user2

[data]
valid users = user1, user2


And we want to add "user3" to "valid users" in [homes] in a script.


I've searched a bit and found some INI-file parsers, but they are basically for extracting values, not editing/changing/adding them.

Are there any perl modules which help editing smb.conf or INI-files in an automated/scripted way?


--
Tomasz Chmielewski
http://wpkg.org
.