{"id":147,"date":"2014-05-09T06:59:45","date_gmt":"2014-05-09T06:59:45","guid":{"rendered":"http:\/\/muse.oneshot.in\/?p=147"},"modified":"2014-05-09T06:59:45","modified_gmt":"2014-05-09T06:59:45","slug":"how-to-execute-a-ommand-with-a-nologin-user-in-linux","status":"publish","type":"post","link":"https:\/\/muse.oneshot.in\/?p=147","title":{"rendered":"How to execute a ommand with a nologin user in Linux"},"content":{"rendered":"<p>For example here the nologin user is apache<\/p>\n<p>use the below command<\/p>\n<p>sudo -u apache bash<\/p>\n<p>U Specifies the user<br \/>\napache is the nologin user in my system<br \/>\nbash opens a bash shell with apache as the user<\/p>\n<p>On executiong the command a bash prompt will be opened with apache as the user.<br \/>\n[root@nagios1 ~]# sudo -u apache bash<br \/>\nbash-4.1$<\/p>\n<p>Once you are in Bash prompt you can use any command<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For example here the nologin user is apache use the below command sudo -u apache bash U Specifies the user apache is the nologin user in my system bash opens a bash shell with apache as the user On executiong the command a bash prompt will be opened with apache as the user. [root@nagios1 ~]# [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":149,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8],"tags":[],"class_list":["post-147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-linux-commands"],"_links":{"self":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=147"}],"version-history":[{"count":1,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":148,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions\/148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/media\/149"}],"wp:attachment":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}