{"id":319,"date":"2013-07-30T11:50:40","date_gmt":"2013-07-30T16:50:40","guid":{"rendered":"http:\/\/installingcats.com\/?p=319"},"modified":"2013-07-30T11:50:40","modified_gmt":"2013-07-30T16:50:40","slug":"splunk-account-currently-not-available-boot-start","status":"publish","type":"post","link":"https:\/\/installingcats.com\/2013\/07\/30\/splunk-account-currently-not-available-boot-start\/","title":{"rendered":"Splunk – account currently not available – boot-start"},"content":{"rendered":"
.\/splunk enable boot-start -user splunk<\/p>\n
returns error:<\/p>\n
This account is currently not available.<\/p>\n
First-time-run has not finished. \u00a0Ignore this error when previewing migration – exiting.<\/p><\/blockquote>\n
Cause for error is the specified user has no shell<\/em><\/strong>.<\/p>\n
Fix<\/strong> – set the shell for the splunk user (“splunk” in this case), to \/bin\/bash<\/em>.<\/p>\n
Run in the terminal:<\/p>\n
usermod -s \/bin\/bash splunk<\/p>\n
.\/splunk enable boot-start -user splunk<\/p>\n
If all goes well enabling boot-start you should see splunk return:<\/p>\n
Adding system startup for \/etc\/init.d\/splunk …<\/p>\n
\/etc\/rc0.d\/K20splunk -> ..\/init.d\/splunk<\/p>\n
\/etc\/rc1.d\/K20splunk -> ..\/init.d\/splunk<\/p>\n
\/etc\/rc6.d\/K20splunk -> ..\/init.d\/splunk<\/p>\n
\/etc\/rc2.d\/S20splunk -> ..\/init.d\/splunk<\/p>\n
\/etc\/rc3.d\/S20splunk -> ..\/init.d\/splunk<\/p>\n
\/etc\/rc4.d\/S20splunk -> ..\/init.d\/splunk<\/p>\n
\/etc\/rc5.d\/S20splunk -> ..\/init.d\/splunk<\/p>\n
Init script installed at \/etc\/init.d\/splunk.<\/p>\n
Init script is configured to run at boot.<\/p><\/blockquote>\n
This is for an Ubuntu 12.04 LTS system.<\/p>\n
To avoid the security risk of having another account with shell access, you can remove ssh access for the account by adding the following line to \/etc\/ssh\/sshd_config:<\/p>\n
DenyUsers splunk<\/p>\n
Then restart SSH daemon:<\/p>\n
. \/etc\/init.d\/ssh restart<\/p>\n
This specifically blocks the user splunk<\/strong> from logging in via SSH. \u00a0Even though the username\/password challenge still works for this account, it will never successfully login to a shell, even with the correct password. \u00a0And splunk’s stormforwarder actually needs shell access from this user in order to start at boot time.<\/p>\n
Alternatively you can block SSH login access to all accounts except the one you specify with this line:<\/p>\n
AllowUsers chosenaccount<\/p>\n
Where chosenaccount<\/strong> will be the only<\/em> user that can login via SSH, using password or keys.<\/p>\n","protected":false},"excerpt":{"rendered":"
.\/splunk enable boot-start -user splunk returns error: This account is currently not available. First-time-run has not finished. \u00a0Ignore this error when previewing migration – exiting. Cause for error is the specified user has no shell. Fix – set the shell for the splunk user (“splunk” in this case), to \/bin\/bash. Run in the terminal: usermod […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/319"}],"collection":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/comments?post=319"}],"version-history":[{"count":0,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/319\/revisions"}],"wp:attachment":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/media?parent=319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/categories?post=319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/tags?post=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}