{"id":674,"date":"2013-06-25T09:55:38","date_gmt":"2013-06-25T09:55:38","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=674"},"modified":"2013-06-25T09:55:38","modified_gmt":"2013-06-25T09:55:38","slug":"unix-new-user-strange-shell","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/unix-new-user-strange-shell\/","title":{"rendered":"Unix – new user strange shell"},"content":{"rendered":"

\"shellbanner\"<\/p>\n

I faced this issue when i tried to create a new user on Ubuntu server, new user was given the Bourne shell rather than the Bash shell, this is a basic shell located in \/bin\/sh, and it looks boring, you won’t be able to use auto-completion with such shell. in this article, i will show you how to change default shell of an unix user.<\/p>\n

<\/p>\n

Normally, \u00a0you create a new user using this command:<\/p>\n

\n$ useradd username\n<\/pre>\n

that user will have no command autocompletion and no current directory shown before the command prompt. The user’s shell can be changed using:<\/p>\n

\n$ chsh -s \/bin\/bash username\n<\/pre>\n

To change the default shell, look in<\/p>\n

\n$ \/etc\/defaults\/useradd\n<\/pre>\n

and there is a SHELL directive in there that can be changed to<\/p>\n

\n$ SHELL=\/bin\/bash\n<\/pre>\n

Cheer!!<\/p>\n","protected":false},"excerpt":{"rendered":"

I faced this issue when i tried to create a new user on Ubuntu server, new user was given the Bourne shell rather than the Bash shell, this is a basic shell located in \/bin\/sh, and it looks boring, you won’t be able to use auto-completion with such shell. in this article, i will show…<\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,66],"tags":[84,92,51,64],"aioseo_notices":[],"views":5,"_links":{"self":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/674"}],"collection":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/comments?post=674"}],"version-history":[{"count":0,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/674\/revisions"}],"wp:attachment":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/media?parent=674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/categories?post=674"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/tags?post=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}