Skip to main content

Posts

HOW TO SHARE SAMBA SHARE FROM WINDOWS TO SOLARIS 11

SHARE WINDOWS FOLDER WITH SAMBA IN SOLARIS 11 OPEN THOSE PORT IF YOU HAVE A FIREWALL BETWEEN SERVERS PORT    STATE SERVICE 135/tcp open  msrpc 139/tcp open  netbios-ssn 445/tcp open  microsoft-ds 137 UDP 138 UDP INSTALL SAMBA PACKAGES #pkg install samba ENABLE EACH SERVICES AFTER INSTALLING SAMBA AND CONFIGURE THE SMB.CONF #svcadm enable idmap #svcadm enable smb/client #svcadm enable samba root@:/# vi /etc/samba/smb.conf [ftps]   path = //april.domaintest/FTPS   realm = april.domaintest.com   netbios name = april   passdb backend = YourSharingPassword   guest account = SAMBAUX   log file = /var/samba/log/%m.log   load printers = No   wins server = YourWinServer    winbind trusted domains only = No   workgroup = domaintest.com   hosts allow = 192.168.1.10    TEST THE CONNECTION WITH WINDOWS SAMBA SERVER SHARE     root@:/#  smbclient -L //april/FTPS/ -s /etc/samba/smb.conf -N Anonymous login successful         Sharename       Ty

HOW TO ADD A LINE WITH ANSIBLE WITH TAB SPACE IN A FILE

-bash-4.2# vi add_line_syslog.yml --- - name: script in order to add in the server list below with TAB spaces a Line in the SYSLOG CONF   hosts: oraking   tasks:     - name: Add a Line  in /etc/syslog.conf in order to delivery that information to another server       lineinfile:         path: /etc/syslog.conf         line: " *.err;auth.notice;auth.info;local0.info \t\t @10.10.10.200 "         insertbefore: ' \*.alert;kern.err;daemon.err '     - name: Restart system-log       command: /usr/sbin/svcadm restart svc:/system/system-log:default

How to add or Increase a File System in Red Hat

1) Verify Multipath Devices in order to know the last one  [root@unixaddiction ~]# multipath -ll mpathd (360060e80139cfc0050209cfc00000994) dm-3 HITACHI,OPEN-V size=650G features='1 queue_if_no_path' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active   |- 11:0:0:2 sdd 8:48  active ready running   `- 12:0:0:2 sdi 8:128 active ready running mpathc (360060e80139cfc0050209cfc00000993) dm-4 HITACHI,OPEN-V size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active   |- 11:0:0:1 sdc 8:32  active ready running   `- 12:0:0:1 sdh 8:112 active ready running mpathb (360060e80139cfc0050209cfc00000992) dm-6 HITACHI,OPEN-V size=400G features='1 queue_if_no_path' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active   |- 11:0:0:0 sdb 8:16  active ready running   `- 12:0:0:0 sdg 8:96  active ready running mpathi (360060e80139cfc005

HOW TO SHARE WITH ZFS A FILE SYSTEM IN SOLARIS 11

As root execute the following Create the pool #zpool create ztemp c0d0 Create ZFS  #zfs create ztemp/temp Mount ZFS  #zfs set mountpoint=/temp ztemp/temp Share ZFS with the option "sharenfs=on" #zfs set sharenfs=on ztemp/temp Share and Select the PATH and SERVERS that you need that mount the ZFS from the NFS Server in our case the servers are oracle1,oracle2 and oracle3 with Read and Write Options #zfs set share=name=temp,path=/temporario,prot=nfs,anon=0,rw=oracle1:oracle2:oracle3 ztemp/temp

HOW TO CHANGE A LINE IN A FILE AND RESTART A SERVICE

HOW TO CHANGE A LINE IN A FILE IN AND RESTART A SERVICE --- - name: modify el /etc/ssh/sshd_config to change  root login   hosts: LINUX_SERVERS   tasks:     - name:  /etc/ssh/sshd_config, line PermitRootLogin       lineinfile:         path: /etc/ssh/sshd_config         regexp: 'PermitRootLogin'         line: 'PermitRootLogin no'     - name: restart sshd daemon       service: name=sshd state=restarted     - name: status sshd daemon       service: name=sshd state=restarted

HOW TO UPDATE A PACKAGE LIST WITH ANSIBLE

HOW TO UPDATE A PACKAGE LIST WITH ANSIBLE  --- - name: Update package list   hosts: test1 test2 test3 test4 test5   tasks:     - name: Update dhcp package       yum:         name: dhcp         state: latest         update_only: yes     - name: Update dhcp dhcp-common       yum:         name: dhcp-common         state: latest         update_only: yes     - name: Update dhcp dhcp-libs       yum:         name: dhcp-libs         state: latest         update_only: yes     - name: Update dhcp dhclient       yum:         name: dhclient         state: latest         update_only: yes

HOW TO SET PASSWORD WITH ANSIBLE MULTIPLE HOST

HOW TO SET PASSWORD WITH ANSIBLE  --- - name: Set Password   hosts: test1 test2 test2   become: yes   ignore_errors: yes   tasks:       - name: Change root password         user:           name: root           password: $dff2878927319283198439843hjsddhdkjch823787431213413dwfwfvwgwwq.           update_password: always (In password: Encrypted Password  )