Thursday, March 09, 2006

Notes to creating additional user to samba:

useradd -u 612 -g 501 bridgegate
passwd (set password for bridgegate user)

cat /etc/passwd | /usr/bin/mksmbpasswd.sh > /etc/samba/smbpasswd
smbpasswd bridgegate

Tuesday, February 28, 2006

Verisign key create

http://www.verisign.com/support/ssl-certificates-support/page_dev020184.html

Thursday, February 02, 2006

Netapp commands:

#list users
useradmin user list

#list group
useradmin group list

#create user guest, group guest
useradmin user add guest -g guest

# set guest as default nt user
options wafl.default_nt_user guest

# delete user bpm
useradmin user delete bpm

# delete group bpm
useradmin group delete bpm

# add qtree security /vol/bpm type ntfs
qtree security /vol/bpm ntfs

# allow archive and bpm full control through cifs
cifs access archive archive "full control"
cifs access bpm archive "full control"

# export export file
exportfs -a

JBoss.com - Wiki - UsingPortForwardingWithJBoss

iptables -t nat -A PREROUTING -p tcp --dport 80 -d 10.10.100.26 -j DNAT --to 10.10.100.26:9000

# to save policy
iptables-save -c > /etc/iptables-save

#To load rule-set with the iptables-restore command, we could do this in several ways, but we will mainly look at the simplest and most common way here.

cat /etc/iptables-save iptables-restore -c

Tuesday, December 06, 2005

find file base on date

$find . -mtime 10 -print
Find files on our current directory and all its sub-directories that were modified 10 days ago.

$find . -mtime +5 -mtime -8 -print
Find files on your current directory and all its sub-directories that were modified between 5-8 days.

$find . -type f -atime +35 -print
Find files on your current directory and all its sub-directories that are FILES and were not accessed for more than 35 days.

http://www.linuxpowered.com/html/editorials/find.html

Monday, November 21, 2005

Deleting a message from the Postfix queue

The postsuper command has an option to delete Postfix message queue files. To delete the message with queue id ABCDEF, perhaps obtained from mailq output, one would use:

# postsuper -d ABCDEF

To delete a large number of files one would use:

# postsuper -d - < filename-with-queue-ids

To delete all messages in queue:

#postsuper -d ALL
http://www.postfix.org/faq.html

access-list syntax

address-list acl_name deny permit protocol src_addr src_mask dest_addr dest_mask dest_operator dest_port

access-group acl_name in interface in_name

Thursday, November 17, 2005

How to Delete Messages from Queues in Exchange Server 2003



1. Click Start, point to All Programs, point to Microsoft Exchange, and then click System Manager.


2. Double-click Servers, double-click the server that you want, and then click Queues.


3. Right-click the queue that you want to modify, and then click Freeze to freeze the queue.


4. Click Find Messages, and then click Find Now to find messages in the queue.


5. Right-click the message that you want to delete, and then click one of the following options:
• Click Delete (no NDR) to delete messages from the queue without sending a non-delivery report (NDR) to the senders.
• Click Delete (with NDR) to delete messages from the queue and send an NDR to the senders of the messages.

Access lists on the PIX firewall can only be applied to traffic entering an interface, not traffic that is exiting an interface. This is unlike Cisco router, on which access lists can be applied in either direction.

The syntac for access lists on the PIX firewall is ver similar to that of Cisco routers. The key difference is that access lists on the PIX firewalls use standard wildcard masks, whereas on routers they use inverse wildcard masks. For example, when blcoking a 24-bit subnet, you would use a mask of 255.255.255.0 on a PIX firewall and a mask of 0.0.0.0.255 on Cisco router.

To let traffic flow from a high security level to a lower level, use the nat and global commands. For the opposite direction, from lower to higher, use the static and access-list commands.

The design of an access list should start with a definition of what is going to be allowed and then proceed to what is going to be denied.

A good practice is to add an explicit deny all statement to the end of an access list so you remember it is there when yu do a show access-list command. You can see how many packets

Inbound traffic is lower security-level to higher security-level

Outbound traffic is higher security-level to lower security-level

Tuesday, November 15, 2005

On some RedHat AS 3.0 installations, laus/audit.d logs 20M a day and never logrotates. You can just do the following:

/etc/init.d/audit stop
rpm -f /dev/auditrpm --erase laus
/etc/init.d/crond restart
/etc/init.d/atd restart
rm -rf /var/log/audit.d

I've got some bounced mail in the queue which is not being accepted by the remote site. How can I remove it from the queue?

postfix stop
find /var/spool/postfix -name queue-id -print xargs rm
postfix start