{"id":775,"date":"2013-06-05T09:35:13","date_gmt":"2013-06-05T01:35:13","guid":{"rendered":"http:\/\/j178.mtgbb.com\/?p=775"},"modified":"2013-06-05T09:38:03","modified_gmt":"2013-06-05T01:38:03","slug":"aix-change-shell","status":"publish","type":"post","link":"https:\/\/j178.mtgbb.com\/?p=775","title":{"rendered":"Change user shell on FreeBSD Linux and AIX"},"content":{"rendered":"<p>\u53c3\u8003\u8cc7\u6599\uff1a <a href=\"http:\/\/www.ivorde.ro\/Change_user_shell_on_FreeBSD_Linux_and_AIX-47.html\" title=\"\u9019\u88e1\">\u9019\u88e1<\/a><\/p>\n<p>Display user information (FreeBSD):<\/p>\n<pre>\r\n$pw usershow user_name\r\nuser_name:*:1002:1002::0:0:Some User Name:\/home\/user_name:\/bin\/sh\r\n<\/pre>\n<p>You&#8217;ll notice that last field (\/usr\/local\/bin\/bash) is the shell of the user.<br \/>\nDisplay user information(AIX):<\/p>\n<pre>\r\n$ lsuser -a shell root\r\nroot shell=\/usr\/bin\/ksh\r\n<\/pre>\n<p>Change user&#8217;s shell on FreeBSD system to bash<\/p>\n<pre>\r\n$ pw usermod user_name -s \/usr\/local\/bin\/bash\r\n$ pw usershow user_name\r\nuser_name:*:1002:1002::0:0:Some User Name:\/home\/user_name:\/usr\/local\/bin\/bash\r\n<\/pre>\n<p>Change user&#8217;s shell on Linux<\/p>\n<pre>\r\n$ chsh -s \/bin\/bash user_name\r\n<\/pre>\n<p>Change user shell on AIX<\/p>\n<pre>\r\n$ chuser shell=\/path\/to\/new\/shell root\r\n<\/pre>\n<p>In this article I&#8217;ve used root and user_name users. <\/p>\n<p>You&#8217;ll have to use whatever suits your case. <\/p>\n<p>Be careful to what shell you&#8217;re changing to because that user (or root in some cases) will not be able to log in if the shell does not exist or is an altered binary file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c3\u8003\u8cc7\u6599\uff1a \u9019\u88e1 Display user information (FreeBSD): $pw usersh &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[57],"class_list":["post-775","post","type-post","status-publish","format-standard","hentry","category-oracle-erp","tag-oracle-erp"],"_links":{"self":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=775"}],"version-history":[{"count":0,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/775\/revisions"}],"wp:attachment":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}