Help with parsing regex in tripwire for Solaris 10 dfstab


 
Thread Tools Search this Thread
Operating Systems Solaris Help with parsing regex in tripwire for Solaris 10 dfstab
# 1  
Old 11-14-2014
Help with parsing regex in tripwire for Solaris 10 dfstab

Help with parsing regex in tripwire:

the rule is" This test verifies that exported file systems do not have the "root=<host>" option specified."

regex that does not work is :

^[^#].*-o[\ \t]+(?=root=\S+|\S+,root=\S+).*



the dfstab looks like this :


# cat /etc/dfs/dfstab

# Place share(1M) commands here for automatic execution
# on entering init state 3.
#
# Issue the command 'svcadm enable network/nfs/server' to
# run the NFS daemon processes and the share commands, after adding
# the very first entry to this file.
#
# share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
# .e.g,
# share -F nfs -o rw=engineering -d "home dirs" /export/home2

---------
# 2  
Old 11-14-2014
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with understanding this regex in a Perl script parsing a 'complex' string

Hi, I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Discussion started by: newbie_01
3 Replies

2. Shell Programming and Scripting

Sendmail K command regex: adding exclusion/negative lookahead to regex -a@MATCH

I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works: LOCAL_CONFIG # Kcheckaddress regex -a@MATCH +<@+?\.++?\.(us|info|to|br|bid|cn|ru) LOCAL_RULESETS SLocal_check_mail # check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies

3. Shell Programming and Scripting

Parsing large files in Solaris 11

I have a 1.2G file that contains no newline characters. This is essentially a log file with each entry being exactly 78bits long. The basic format is /DATE/USER/MISC/. The single uniform thing about the file is that that the 8 character is always ":" I worked with smaller files of the same... (8 Replies)
Discussion started by: os2mac
8 Replies

4. Solaris

Help with parsing regex in tripwire

We have regex that we use to parse compliance policies in tripwire. can you please help to correct the regex : policy is "Verify That Exported File Systems Specify the ro (read-only) Option" the regex is ^.*-o+(?!ro+|ro\S+|\S+,ro\S+|\S+,ro+).*$ this does not work. how do we fix it ? ... (4 Replies)
Discussion started by: bathija12
4 Replies

5. Solaris

Help with parsing regex in tripwire for Solaris 10 dfstab FQDN

Help with parsing regex in tripwire: the rule is" This test verifies that all exported file systems found in /etc/exports specify a fully qualified domain name containing "thecss.com" or a NIS netgroup.." regex that does not work is : ... (1 Reply)
Discussion started by: bathija12
1 Replies

6. Shell Programming and Scripting

Parsing expect_out using regex in expect script

Hi, I am trying to write an expect script. Being a newbie in expect, maybee this is a silly doubt but i am stuck here. So essentially , i want the o/p of one router command to be captured . Its something like this Stats Input Rx : 1234 Input Bytes : 3456 My expect script looks ... (5 Replies)
Discussion started by: ashy_g
5 Replies

7. Solaris

dfstab Security Questions

Hello, I am in the middle of a security audit (Soalris 10) and have been given the following directives regarding my dfstab file: The SA will ensure the NFS server is configured to deny client access requests that do not include a userid. The SA will ensure access to exported filesystems... (0 Replies)
Discussion started by: stringman
0 Replies

8. Shell Programming and Scripting

Converting perl regex to sed regex

I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly: if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies

9. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

10. UNIX for Dummies Questions & Answers

Updated /etc/dfs/dfstab

Solaris 8. So i updated dfstab and added computer2.acme.com i.e: share -F nfs rw=computer1.acme.com,computer2.acme.com /export/home how do I get the daemon to recognize the change, without kicking computer1.acme.com off? kill -HUP or /etc/init.d/nfsd stop /etc/init.d/nfsd start or... (1 Reply)
Discussion started by: benq70
1 Replies
Login or Register to Ask a Question