RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1349704 - unshare command complaints "Invalid argument" when there "--user" or "-U" option
Summary: unshare command complaints "Invalid argument" when there "--user" or "-U" option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-24 04:43 UTC by Xibo Ning
Modified: 2018-02-22 10:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-24 09:50:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xibo Ning 2016-06-24 04:43:14 UTC
Description of problem:
unsure(1) shows "--user" and "-U" option, while when trying the option, unsure doesn't work.

Version-Release number of selected component (if applicable):
util-linux-2.23.2-26.el7_2.2.x86_64

How reproducible:
Just run the unsure command as follows

Steps to Reproduce:
1.sudo yum install util-linux
2.sudo unshare -m -u -i -n -p -f --user --mount-proc bash


Actual results:
[pkger@dhcp debug]$ sudo unshare -m -u -i -n -p -f --user --mount-proc bash
unshare: unshare failed: Invalid argument
[pkger@dhcp debug]$ 

Expected results:
A new bash process in the new namespace

Additional info:

Comment 2 Karel Zak 2016-06-24 09:50:55 UTC
The user namespaces are "Technology Preview" and disabled by default, see kernel implementation https://bugzilla.redhat.com/show_bug.cgi?id=1138782

If I good remember you need to enable it on kernel command line
(something like grubby --args=user_namespace.enable=1 + reboot).


Note You need to log in before you can comment on or make changes to this bug.