Sponsored Content
Top Forums Shell Programming and Scripting Want to automate some DNS checks Post 302972877 by pica on Wednesday 11th of May 2016 10:53:12 AM
Old 05-11-2016
Thanks for the response!!
Here's what I have so far. I don't yet know the syntax so I'm just trying to write something that seems reasonable.
Code:
#!/bin/bash

echo Please, enter a domain name.
read DOMAIN

dig $DOMAIN NS
dig $DOMAIN TXT

dig k1._domainkey.$DOMAIN TXT
dig _domainkey.$DOMAIN TXT

---------- Post updated at 07:46 AM ---------- Previous update was at 07:38 AM ----------

Any suggestions on what I should do next? I realize I have to learn Bash script syntax but does the basic logic seem reasonable? I know it's a bit simplistic but I figure I should get something to work for my first script and then add features later...

---------- Post updated at 07:53 AM ---------- Previous update was at 07:46 AM ----------

Wow, actually, my script worked. I'm shocked. It's not fancy but it basically did what i wanted. I have to improve it for sure.

Last edited by RudiC; 05-11-2016 at 11:43 AM.. Reason: Changed icode to code tags.
 

10 More Discussions You Might Find Interesting

1. Solaris

Solaris DNS Client For Microsoft DNS Server

hey guys, how to add soalris box as a microsoft DNS Client ? and how to register in the microsoft DNS ?? i managed to query from the DNS server after adding /etc/resolve.conf and editing /etc/nsswitch.conf but i need to register the soalris server (dns Client) into Microsoft DNS automatically.... (3 Replies)
Discussion started by: mduweik
3 Replies

2. UNIX for Dummies Questions & Answers

health checks

Hello Anyone please help me with a health check script on HP-UX. (1 Reply)
Discussion started by: mahlathini
1 Replies

3. UNIX for Advanced & Expert Users

Doing Checks on a file

I have a process that I am trying to provide a solution for and have hit a brick wall and would like some pointers in the right direction. Basically on a daily basis a report is automatically generated in a CSV format (FIRST.CSV) which includes codes and amounts in the following format: ... (6 Replies)
Discussion started by: SAMZ
6 Replies

4. AIX

Pre-checks

AIX Guys!!! What pre-checks would you do on a 5.3 server before TL/SP/APAR installation? Bala (2 Replies)
Discussion started by: balaji_prk
2 Replies

5. UNIX for Advanced & Expert Users

DNS server choice: Windows DNS vs Linux BIND

I'd like to get some opnions on choosing DNS server: Windows DNS vs Linux BIND comparrsion: 1) managment, easy of use 2) Security 3) features 4) peformance 5) ?? I personally prefer Windows DNS server for management, it supports GUI and command line. But I am not sure about security... (2 Replies)
Discussion started by: honglus
2 Replies

6. Red Hat

DNS A-Record point to another DNS

Hi, I have a question on how to point the DNS server-1's A-record to second DNS server, which is DNS server-2. So, the computer can access other domain which only listed in the DNS server-2. The scenario is as follow: http://img689.imageshack.us/img689/6333/12234.png How to configure this... (4 Replies)
Discussion started by: Paris Heng
4 Replies

7. Red Hat

DHCP & DNS - Clients get IP but don't register in DNS

I am trying to setup a CentOS 6.2 server that will be doing 3 things DHCP, DNS & Samba for a very small office (2 users). The idea being this will replace a very old Win2k server. The users are all windows based clients so only the server will be Linux based. I've installed CentOS 6.2 with... (4 Replies)
Discussion started by: FireBIade
4 Replies

8. Shell Programming and Scripting

Daily Checks

Hey Guys, I'm seeking some assistance in getting this script to run as a cron job for the user oracle.. the script is basically to perform 2 ADRCI checks... see the script below... i'm getting the following error: /export/home/oracle/Daily_Checks/ADRCI_Daily_Checks.sh: syntax error at line 16:... (7 Replies)
Discussion started by: Racegod
7 Replies

9. Shell Programming and Scripting

Script to do the following checks

Hi , I need a script for processing below scenario. I have to check daily by doing ftp IP to check it is logging or not. So i want this activity to be automated such that if login succesful i will get "FTP LOGIN SUCCESS" in a log file and if fails i want the error message in the same log... (1 Reply)
Discussion started by: sv0081493
1 Replies

10. Solaris

DNS client added to DNS server but not working

Hi, We have built a new server (RHEL VM)and added that IP/hostname into dns zone configs file on DNS server (Solaris 10). Reloaded the configuration using and added nameserver into resolv.conf on client. But when I am trying nslookup, its not getting resolved. The nameserver is not able to... (8 Replies)
Discussion started by: snchaudhari2
8 Replies
IDMAP_AUTORID(8)					    System Administration tools 					  IDMAP_AUTORID(8)

NAME
idmap_autorid - Samba's idmap_autorid Backend for Winbind DESCRIPTION
The idmap_autorid backend provides a way to use an algorithmic mapping scheme to map UIDs/GIDs and SIDs that is more deterministic than idmap_tdb and easier to configure than idmap_rid. The module works similar to idmap_rid, but it automatically configures the range to be used for each domain, so there is no need to specify a specific range for each domain in the forest, the only configuration that is needed is the range of uid/gids that shall be used for user/group mappings and an optional size of the ranges to be used. The mappings of which domain is mapped to which range is stored in autorid.tdb, thus you should backup this database regularly. Due to the algorithm being used, it is the module that is most easy to use as it only requires a minimal configuration. IDMAP OPTIONS
rangesize = numberofidsperdomain Defines the number of uids/gids available per domain range. The minimum needed value is 2000. SIDs with RIDs larger than this value will be mapped into extension ranges depending upon number of available ranges. If the autorid backend runs out of available ranges, mapping requests for new domains (or new extension ranges for domains already known) are ignored and the corresponding map is discarded. Example: with rangesize set to 10000, users/groups with a RID up to 10000 will be put into the first range for the domain. When attempting to map the an object with a RID of 25000, an extension range will be allocated that will then be used to map all RIDs from 20000-29999. One range will be used for local users and groups and for non-domain well-known SIDs like Everyone (S-1-1-0) or Creator Owner (S-1-3-0). A chosen list of well-known SIDs will be preallocated on first start to create deterministic mappings for those. Thus the number of local users and groups that can be created is limited by this option as well. If you plan to create a large amount of local users or groups, you will need set this parameter accordingly. The default value is 100000. read only = [ yes | no ] Turn the module into read-only mode. No new ranges will be allocated nor will new mappings be created in the idmap pool. Defaults to no. ignore builtin = [ yes | no ] Ignore any mapping requests for the BUILTIN domain. Defaults to no. THE MAPPING FORMULAS
The Unix ID for a RID is calculated this way: ID = REDUCED RID + IDMAP RANGE LOW VALUE + RANGE NUMBER * RANGE SIZE where REDUCED RID = RID % RANGE_SIZE and a DOMAIN RANGE INDEX = RID / RANGE_SIZE is used together with the domain sid to determine the RANGE NUMBER (stored in the database). Correspondingly, the formula for calculating the RID for a given Unix ID is this: RID = (ID - LOW ID) % RANGE SIZE + DOMAIN RANGE INDEX * RANGE SIZE Where the DOMAIN RANGE INDEX is retrieved from the database along with the domain sid by the RANGE NUMBER = (ID - LOW ID) / RANGE SIZE . EXAMPLES
This example shows you the minimal configuration that will work for the principal domain and 19 trusted domains / range extensions. [global] security = ads workgroup = CUSTOMER realm = CUSTOMER.COM idmap config * : backend = autorid idmap config * : range = 1000000-1999999 This example shows how to configure idmap_autorid as default for all domains with a potentially large amount of users plus a specific configuration for a trusted domain that uses the SFU mapping scheme. Please note that idmap ranges and sfu ranges are not allowed to overlap. [global] security = ads workgroup = CUSTOMER realm = CUSTOMER.COM idmap config * : backend = autorid idmap config * : range = 1000000-19999999 idmap config * : rangesize = 1000000 idmap config TRUSTED : backend = ad idmap config TRUSTED : range = 50000 - 99999 idmap config TRUSTED : schema_mode = sfu AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. Samba 4.0 06/17/2014 IDMAP_AUTORID(8)
All times are GMT -4. The time now is 07:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy