The directory will not be created if it is missing. If you insist on using the wrong tool, you will have to manually create the home directory and the user groups and copy the default files from /etc/skel etc., etc. I had always thought that getting fcontext would solve (most) of "avc denied" related selinux problems. but i'm quite new at Linux, so i really can't explain. weblink
Is there a way to accomplish what I'm trying to accomplish? addr=? Remove advertisements Sponsored Links oky View Public Profile Find all posts by oky #5 04-21-2011 ankurk Registered User Join Date: Feb 2009 Last Activity: 16 August 2014, 1:37 Results 1 to 10 of 10 Thread: useradd: cannot create directory /home/ Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode
Remove advertisements Sponsored Links fpmurphy View Public Profile Visit fpmurphy's homepage! Top xeugene123x Posts: 14 Joined: 2011/10/27 06:22:07 Contact: Contact xeugene123x Website Re: adduser: cannot create directory /home/user Quote Postby xeugene123x » 2011/10/27 17:16:24 I currently have selinux disabled.I was logged into Find all posts by fpmurphy #3 04-20-2011 ankurk Registered User Join Date: Feb 2009 Last Activity: 16 August 2014, 1:37 AM EDT Posts: 30 Thanks: 3 Thanked 0
Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. UbuntuCommunityAsk!DeveloperDesignDiscourseHardwareInsightsJujuShopMore ›AppsHelpForumLaunchpadMAASCanonical current community chat Ask Ubuntu Ask Ubuntu Meta your communities Sign up or log in to customize your list. And a mkdir at the same place in the %pre as the useradd (directly before it presumably) worked just fine? Useradd Home Directory Not Created That doesn't work: if i change the homedirectory there, i can add an extra file 'level' and he doesn't give an error message, but the directory is not created in real.
Register. 06-08-2012 #1 vishal84 View Profile View Forum Posts Private Message View Articles Just Joined! Ansible Useradd: Cannot Create Directory You can turn this off if needed, using semanage. Top gerald_clark Posts: 10595 Joined: 2005/08/05 15:19:54 Location: Northern Illinois, USA [SOLVED] adduser: cannot create directory /home/user Quote Postby gerald_clark » 2011/10/27 14:35:00 drwx-------- 25 root admin 4096 October 27 03:40 By the way, if you do not need to have NIS and autofs running, you can just stop those services and configure the system to use local authentication (files) and home
Add the following line to that file. ... Mkdir Cannot Create Directory Permission Denied Linux After this change my code produces same results on all servers. But judging from the output, you try to have a dir /home instead of /home/
command-line bash users home-directory share|improve this question edited Apr 10 '15 at 16:06 asked Nov 10 '13 at 10:48 tchakravarty 3671411 add a comment| 8 Answers 8 active oldest votes up share|improve this answer edited Jun 15 at 16:38 Community♦ 1 answered Nov 10 '13 at 12:44 Radu Rădeanu 79.4k24177261 +1 for mentioning /etc/skel –Joe Nov 14 '13 at 2:11 Useradd: Cannot Create Directory In Linux I have set the chmod to 777 on both files but it's not I have also tried chown -R user /homeI still seem to be getting the same errors? Useradd With Home Directory In Linux If you have any further questions regarding this, please let us know.
greetz Jan Jantje View Public Profile Find all posts by Jantje #2 23rd October 2005, 09:25 PM giulix Offline Registered Join Date: Oct 2005 Location: CE(S)T Posts: 3,240 have a peek at these guys Ok. up vote 6 down vote favorite 2 I created a new user (testuser) using the useradd command on an Ubuntu server Virtual machine. If I execute this command via RPM when running as root, I get the following error: useradd: cannot create directory /usr/myapp Does RPM run as a different user when installing/running install Useradd: Cannot Create Directory /opt/splunk
I am aware that Ubuntu is built on Debian but thought that a distinction was being made. –Keith Bennett May 15 '15 at 16:11 1 I used adduser but still jimi-c closed this Apr 22, 2014 Sign up for free to join this conversation on GitHub. useradd has been modified on Fedora: I seem to remember that on Solaris, for instance, that used to work... __________________ Asus K55VD, i5 3230M - Productivity/Programming (F24) Asus M32CD - i7-6700, http://rinfix.com/cannot-create/useradd-cannot-create-directory-home-test.html From man useradd: useradd is a low level utility for adding users.
Isn't it possible to create any homedirectory that you want? Remove User Linux What episode of Star Trek is this creature on? Posts: 1,300 Re: SElinux denies creating home dir No, you have just set the context of this directory.
Find the rate of change at a point on a polynomial Can a president win the electoral college and lose the popular vote Is there an actual army in 1984? Perhaps adding a note to the createhome option regarding the parent directory existing on certain platforms might be useful. FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc. Man Useradd Missing } inserted. \int dx = x + C & As a monk, can I use Deflect Missiles to protect my ally?
If you need to reset your password, click here. Jantje View Public Profile Find all posts by Jantje Tags create, directory, problem, useradd « Previous Thread | Next Thread » Thread Tools Show Printable Version Display Modes Linear Mode Switch drwxr-xr-x 30 root root 4096 Mar 31 00:09 . this content Ankurk ankurk View Public Profile Find all posts by ankurk #4 04-20-2011 oky Registered User Join Date: May 2009 Last Activity: 23 April 2015, 2:53 PM EDT Posts:
Forum Operations by The UNIX and Linux Forums current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Not a member yet? I suggest you to move the new home directory directly under /var: /var/virtual_users. __________________ :confused: Skull One View Public Profile Find all posts by Skull One Tags creating, denies, dir, home, Join Us!
I would like to create a home directory for the user and also give them root provileges.