Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

useradd はディレクトリを再帰的に作成することができますか?

Solution Verified - Updated -

Issue

useradd コマンドを使用して、ユーザーを追加してディレクトリを作成するとエラーが発生し、以下のメッセージが表示されます。

# useradd -m -d /home/user/testuser1 testuser1
useradd: cannot create directory /home/user/testuser1

"/home/user/" および "/home/user/testuser1" が同時に作成されることを期待していましたが、"/home/user" が作成されませんでした。

Environment

  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.