Thursday, August 25, 2016

Change Linux root user password of Cloudera Hadoop nodes

Cloudera Manager only uses the root credentials when adding a new node to the cluster. Once the node has been added and the Cloudera Manager agent deployed the server will no longer use the root credentials.

i.e.  Once your cluster is set up, you can safely change the root password. Cloudera Manager does not save SSH credentials and all credential information is discarded once the installation is complete.

Changing the root password will not affect any currently deployed services. Nodes talk to each other o SSH key based authentication 

sh-4.2# passwd root
New password: 
Retype new password:
passwd:all authentication tokens updated successfully.

Monday, June 29, 2015

Splunk useful commands

put cluster in maintenance mode

$SPLUNK_HOME/bin/splunk enable maintenance-mode

rolling restart

splunk rolling-restart cluster-peers

Daily License volume by host

index=_internal source=*license_usage.log type=Usage 
 | stats sum(b) as bytes by h 
 | eval MB = round(bytes/1024/1024,1)
 | fields h MB
 | rename h as host

Friday, May 29, 2015

Command to recursively delete files older than N days

this command will delete all files inside c:\Folder and subfolders which are older than <Number of Days>

forfiles -p "C:\Folder" -s -m *.* /D -<Number of Days> /C "cmd /c del @path"

Wednesday, April 22, 2015

List of Splunk universal forwarders with client OS & version

index=_internal source=*metrics.log group=tcpin_connections | eval sourceHost=if(isnull(hostname), sourceHost,hostname) | dedup sourceHost | table sourceHost sourceIP os version | sort version

Friday, March 27, 2015

Linux Commands

List all Linux users

cut -d: -f1 /etc/passwd

set password never to expire

chage -I -1 -m 0 -M 99999 -E -1 username

find process uptime

systemctl status splunk

Thursday, September 25, 2014

Linux Check last password change, expire date & other info

$chage -l root


Last password change                                    : Sep 25, 2014
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999

Number of days of warning before password expires       : 7

 Other options

  -d, --lastday LAST_DAY        set last password change to LAST_DAY
  -E, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
  -h, --help                    display this help message and exit
  -I, --inactive INACTIVE       set password inactive after expiration
                                to INACTIVE
  -l, --list                    show account aging information
  -m, --mindays MIN_DAYS        set minimum number of days before password
                                change to MIN_DAYS
  -M, --maxdays MAX_DAYS        set maximim number of days before password
                                change to MAX_DAYS
  -W, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS

Monday, July 14, 2014

Remote connection to Oracle database using SQL*Plus