Help to create a regex for this policy


 
Thread Tools Search this Thread
Operating Systems Solaris Help to create a regex for this policy
# 1  
Old 11-14-2014
Help to create a regex for this policy

Help with creating regex in tripwire :

the rule is " The idea of it looks to ensure that just ‘share' isn't used in dfstab, must be /usr/sbin/share"


Perform the following to determine if the system is configured as recommended: # grep -v '^#' /etc/dfs/dfstab | grep 'share' | grep -v '/usr/sbin/share' [there should be no output]


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

9 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Perl, RegEx - Help me to understand the regex!

I am not a big expert in regex and have just little understanding of that language. Could you help me to understand the regular Perl expression: ^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{ ------ This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies

3. AIX

Password Policy

I need help. I have set a password policy. But I want to dis allow setting user name as password. My policy is as below... min length =8 min diff=2 min alpha=2 max repeats=2 dictionary= /usr/share/dict/words Still user can set his username as password (i.e. Jackie1234). Code tags for... (11 Replies)
Discussion started by: powerAIX
11 Replies

4. UNIX for Dummies Questions & Answers

read regex from ID file, print regex and line below from source file

I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header. In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

5. Cybersecurity

Need patch policy help

I'm working on developing a patch policy for a mid-size and quickly growing company. Patches have been at the bottom of the totem pole for years. I possess the ability and care enough to straighten it out. However I'd like some others input on the best way to handle the patch policy. From when... (1 Reply)
Discussion started by: jlouki01
1 Replies

6. Shell Programming and Scripting

Using a reverse regex to create a number

Hi all, I'm having an issue about a code i should write... I have a file... with the following numbers in regex format: $ cat file_regex.txt 55500508007* 55500218200* 182936* 182929* 4179* 381* 550069341* So this is a file cointaing some regex... so for each regex i need to... (3 Replies)
Discussion started by: poliver
3 Replies

7. UNIX for Dummies Questions & Answers

awk to match multiple regex and create separate output files

Howdy Folks, I have a list that looks like this: (file2.txt) AAA BBB CCC DDD and there are 24 of these short words. I am matching these patterns to another file with 755795 lines (file1.txt). I have this code for matching: awk -v f2=file2.txt ' BEGIN { while(... (2 Replies)
Discussion started by: heecha
2 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. UNIX for Dummies Questions & Answers

Policy Manager

I have searched all over the SCO website and can't seem to find an answer to this error message. Has anyone seen the following error, and if so what steps do I need to take to fix it? I don't really want to reload the entire OS if I don't have to. LOGIN: ERROR- Failed to initialize policy... (1 Reply)
Discussion started by: mikeinmi
1 Replies
Login or Register to Ask a Question