Russian Monk has asked for the wisdom of the Perl Monks concerning the following question:

Creating custom screens for Samba in Webmin for our product. Need help with a script to parse user created share information from the smb.conf file. Any help would be appreciated. After this, things will get more complicated, will need to be able to edit the displayed info and save it back to the file. Thanks, Russian Monk

Replies are listed 'Best First'.
Re: Parsing Shares from SMB.CONF
by iguanodon (Priest) on Feb 10, 2003 at 21:09 UTC
    smb.conf files are in Windows .ini format. I'd look into one of the many config file parsers available on CPAN.

      Config::IniFiles is one of the candidates.

      Well done is better than well said. -- Benjamin Franklin

Re: Parsing Shares from SMB.CONF
by dmitri (Priest) on Feb 10, 2003 at 21:15 UTC
    I would not assume that everyone is familiar with smb.conf format. I'd include a sample file or a piece of it with a couple of records, so that more people can give you suggestions.
Re: Parsing Shares from SMB.CONF
by CountZero (Bishop) on Feb 10, 2003 at 21:17 UTC

    Welcome Russian Monk to Perlmonks. ++ to you for joining us.

    Now read the FAQs to learn about the best way to ask questions and quickly get answers.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law