{"id":481,"date":"2010-04-14T11:39:01","date_gmt":"2010-04-14T16:39:01","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=481"},"modified":"2010-11-01T10:52:39","modified_gmt":"2010-11-01T15:52:39","slug":"lock-users-to-home-directory","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2010\/04\/lock-users-to-home-directory\/","title":{"rendered":"Lock Users To Home Directory"},"content":{"rendered":"<p>I needed to give access to a user (a web developer) but didn&#8217;t want them to be able to go anywhere but their home directory.  The server is running Ubuntu 9.10 x32.  No GUI.<\/p>\n<p>A brief search found a shell called Iron Bars restricted SHell for linux (IBSH).  This also allows you to prohibit certain commands from running.<\/p>\n<p><code>wget http:\/\/downloads.sourceforge.net\/project\/ibsh\/ibsh-binary\/ibsh_debian_binary\/debian_ibsh.deb?use_mirror=cdnetworks-us-1<\/code><br \/>\n<code>dpkg -i debian_ibsh.deb<\/code><br \/>\n<code>apt-get install -f<\/code><br \/>\n<code>nano \/etc\/ibsh\/globals.cmds<\/code><\/p>\n<p>You can put whatever commands you want to allow in that file.  Save it.<\/p>\n<p><code>nano \/etc\/passwd<\/code><br \/>\nChange the shell of the user to \/bin\/ibsh<\/p>\n<p>Login as the user and test it out.  Try to cd \/etc or rm -rf \/ and see what happens.<\/p>\n<p>***EDIT***<br \/>\nThe Link is http:\/\/downloads.sourceforge.net\/project\/ibsh\/ibsh\/ibsh-0.3a\/ibsh-0.3a-i386-linuxbsd-src.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fibsh%2F&#038;ts=1288626692&#038;use_mirror=iweb<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to give access to a user (a web developer) but didn&#8217;t want them to be able to go anywhere but their home directory. The server is running Ubuntu 9.10 x32. No GUI. A brief search found a shell called Iron Bars restricted SHell for linux (IBSH). This also allows you to prohibit certain &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2010\/04\/lock-users-to-home-directory\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Lock Users To Home Directory<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":2,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"predecessor-version":[{"id":610,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/481\/revisions\/610"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}