Created
June 3, 2015 22:13
-
-
Save mrunalp/0f65c8d9d5b709eb6642 to your computer and use it in GitHub Desktop.
unshare
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unshare -Urm --mount-proc |
Actually
unshare -Urm --mount-proc=/proc
[mrunal@localhost ~]$ unshare -Umprf --mount-proc=/proc sh
sh-4.3#
sh-4.3# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 20:47 pts/2 00:00:00 sh
root 2 1 0 20:47 pts/2 00:00:00 ps -ef
sh-4.3# cat /proc/self/uid_map
0 1000 1
sh-4.3# id
uid=0(root) gid=0(root) groups=0(root),65534(nfsnobody) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
sh-4.3# exit
exit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@LK4D4 Does the --mount-proc option work for you?