Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi Friends,
In my machine, there are 2 mount points - / and /userdata. From the root user, I want to create an oracle user at the /userdata mount point, i.e the home of the oracle user should be mounted on /userdata. Is it possible, if yes then pls guide me for the same.
Hi Friends,
In my machine, there are 2 mount points - / and /userdata. From the root user, I want to create an oracle user at the /userdata mount point, i.e the home of the oracle user should be mounted on /userdata. Is it possible, if yes then pls guide me for the same.
Thanks in Advance,
Rajesh
Yes its possible, you can use -d option to achieve that.
Uhh...no. Read the man page for useradd. The "-d" option SPECIFIES the directory to use for the new user. The "-m" option creates it.
Well, if it is linux then -m option is not really required, the directory will be created automatically. Just using the -d option will specify where to create the home directory. And ya I agree, -d option doesn't create directory, it only specifies its location, thanks for pointing that out.
And again if I've posted something wrong here, please let me know.
Last edited by Sayan Acharjee; 10-20-2010 at 07:43 AM.
Well, if it is linux then -m option is not really required, the directory will be created automatically. Just using the -d option will specify where to create the home directory. And ya I agree, -d option doesn't create directory, it only specifies its location, thanks for pointing that out.
And again if I've posted something wrong here, please let me know.
No, sorry.
The -d option says what directory TO use. -m option says to create it. From the man page:
Quote:
-d, --home homedir
This option specifies the users home directory. If not specified, the default from /etc/default/useradd is used.
-m, --create-home
Create home directory for new user account.
Just specifying the -d option does NOT automatically create a home directory. On some versions of Linux, depending on how it's set up, it may create a directory. The -m option specifically tells it to. Again, -d will create it wherever the DEFAULT home directory space is, so if it's /home, it'll get created there, unless you specify differently, which is what the OP asked for.
The -d option says what directory TO use. -m option says to create it. From the man page:
Just specifying the -d option does NOT automatically create a home directory. On some versions of Linux, depending on how it's set up, it may create a directory. The -m option specifically tells it to. Again, -d will create it wherever the DEFAULT home directory space is, so if it's /home, it'll get created there, unless you specify differently, which is what the OP asked for.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.