Browse Source

add: read.me for netns

micha 3 years ago
parent
commit
ce03ab24e1
1 changed files with 12 additions and 0 deletions
  1. 12 0
      read.me

+ 12 - 0
read.me

@@ -0,0 +1,12 @@
+#copy this dir ASP/netns to /opt/ as root 
+cp netns /opt/
+chown -R root:root /opt/netns
+
+# add with sudo visudo
+user      ALL=(ALL) NOPASSWD:/opt/netns/_exec, /opt/netns/create
+
+# now "user" can create "ip netns" with
+sudo /opt/netns/create 14
+
+# and attache as "user" any cmd to it with
+/opt/netns/exec --id=14 --cmd=bash