How do I replace an NIS master server?

900
  1. Let's assume that the domain configuration is under /var/yp/<domainname>;
  2. Let's assume the NIS server configuration is under /var/yp;
  3. Let's assume you have some NIS related configuration files under /etc/ as well. Those could be /etc/yp.conf, /etc/ypserv.conf, /etc/ypserv.securenets and possible others (their filenames usually begin with yp....

What you need to do in order to move your NIS to the new server:

  1. Copy all of these files from the old server to the new one. Make sure they are not existent there beforehand or if they are - take backups before overwriting them!

  2. Decide if the new server will have the same hostname and IP address as the original master.
    If the name is the same you would skip the clients reconfiguration, otherwise it will be necessary to point to the right server (host or IP). I would rather reconfigure the clients

  3. Copy the passwords, groups, shadow files from the old server to the new one

  4. Once you have all files on the new server, run make -C /var/yp
    You may need to stop the NIS service on the old server, as the domains are to be the same and can't have two master servers. If no errors - continue with following steps. Otherwise - well ... troubleshoot.

  5. Run ypwhich on the new server and verify it returns its own hostname

  6. Run ypcat passwd | grep <username>, ypcat group | grep <groupname>
    Verify this works as expected;

  7. Stop the NIS service on the old server, if not done earlier

  8. Reconfigure all NIS clients
    Change their /etc/yp.conf to point to the respective server:
    echo -e "ypserver new_NIS_server" >> /etc/yp.conf.
    (alternatively this is where you would give the new machine the old one's IP/Hostname).

Good luck!

Share:
900

Related videos on Youtube

Augusto
Author by

Augusto

Updated on September 18, 2022

Comments

  • Augusto
    Augusto almost 2 years

    I am new to Python and ibpy, but I´m able to test run my strategy using both. My issue is that I cannot send orders outside the regular trading hours (RTH), when the market is open but ib doesnt consider them a 'regular trading hour'.

    below is how I am sending these orders.

    from ib.opt import Connection
    from ib.ext.Contract import Contract
    from ib.ext.Order import Order
    
    import time
    
    port = 7496
    client = 1
    account = "XXXXX"
    
    newContract = Contract()
    newContract.m_symbol = "CL"
    newContract.m_secType = "FUT"
    newContract.m_exchange = "NYMEX"
    newContract.m_currency = "USD"
    newContract.m_expiry = "201806"
    
    newOrder = Order()
    newOrder.m_orderType = "LMT"
    newOrder.m_totalQuantity = 1
    newOrder.m_action = "BUY"
    newOrder.m_lmtPrice = "65"
    
    tws_conn = Connection.create(port=port, clientId=client)
    print("------ Connecting.... --------")
    tws_conn.connect()
    time.sleep(1)
    #to simplify I am using a number, but this needs to be updated every new order.
    orderId = 1
    tws_conn.placeOrder(orderId, newContract, newOrder)
    

    There order goes in nicely during the RTH, but I get this message when we are outside RTH,:

    07:45:45:392 -> 4-2-1-399-Order Message:
    BUY 1 CL JUN'18 (CLM8) 
    Warning: your order will not be placed at the exchange until 2018-05-14 09:30:00 US/Eastern-
    

    Is there a way to enable RTH orders?

  • voretaq7
    voretaq7 about 11 years
    That's pretty comprehensive. Note that if you're one of the few places that's still using broadcast to determine NIS servers you might not need to do step 8.