{"id":859,"date":"2015-03-19T12:17:31","date_gmt":"2015-03-19T19:17:31","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=859"},"modified":"2015-03-19T12:17:31","modified_gmt":"2015-03-19T19:17:31","slug":"solaris-mount-nfs-share-as-non-root-user","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/solaris-mount-nfs-share-as-non-root-user\/","title":{"rendered":"Solaris Mount NFS Share as Non Root User"},"content":{"rendered":"

Since it took me a while to get this working I made a note of how. Giving a normal user Primary Administrator Role did work but even the role of System Administrator did not allow me to mount and unmount NFS.<\/p>\n

Two Roles I tested:<\/strong><\/p>\n

\r\n# grep Adminis \/etc\/security\/prof_attr\r\n[..]\r\nPrimary Administrator:::Can perform all administrative tasks:auths=solaris.*,solaris.grant;help=RtPriAdmin.html\r\nService Operator:::Administer services:auths=solaris.smf.manage,solaris.smf.modify.framework\r\nSystem Administrator:::Can perform most non-security administrative tasks:profiles=Audit Review,Printer Management,Cron Management,Device Management,File System Management,Mail Management,Maintenance and Repair,Media Backup,Media Restore,Name Service Management,Network Management,Object Access Management,Process Management,Software Installation,User Management,Project Management,All;help=RtSysAdmin.html\r\n<\/pre>\n

The error was like this:<\/strong><\/p>\n

\r\n$ pfexec \/sbin\/mount \/apps\r\nnfs mount: insufficient privileges\r\n<\/pre>\n

Below is what I needed to do. The xvfb service had nothing to do with NFS but I needed it for X display so I am just leaving it in.<\/p>\n

\r\n# cat \/etc\/user_attr\r\n[..]\r\nebs_a::::type=normal;defaultpriv=basic,sys_mount,sys_nfs,net_privaddr;auths=solaris.smf.manage.xvfb,solaris.smf.value.xvfb\r\n\r\n$ ppriv $$\r\n28423:  -bash\r\nflags = <none>\r\n        E: basic,net_privaddr,sys_mount,sys_nfs\r\n        I: basic,net_privaddr,sys_mount,sys_nfs\r\n        P: basic,net_privaddr,sys_mount,sys_nfs\r\n        L: all\r\n$ pfexec \/sbin\/umount \/apps\r\n$ pfexec \/sbin\/mount \/apps\r\n\r\n$ pfexec svcadm disable svc:\/application\/xvfb:default\r\n$ pfexec svcadm enable svc:\/application\/xvfb:default\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

Since it took me a while to get this working I made a note of how. Giving a normal user<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-859","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=859"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/859\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}