Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Parsing Shares from SMB.CONF

by Russian Monk (Initiate)
on Feb 10, 2003 at 20:22 UTC ( [id://234230]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://234230]
Approved by CountZero
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found