Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
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.
it gives an error unable to create home directory. Why so ? How to create user in Solaris? The perfect method?
You don't give any details (version of Solaris? Running this as root? SUDO? Does the directory already EXIST? Using LDAP/NIS?), so it's hard to say. It's either a permissions issue, the directory exists, the /home partition isn't present (or writable), or you're not putting the command in correctly.
In your case, perhaps you're not login as root, so you do not have write permission in /home and you cannot create a home directory for new user. Therefore it's throwing error.
In order to do it successfully, switch to root user.
---- ADD ----
Also if you are already running as root, then there's probability that /home isn't there or not mounted. Instead in Solaris 10, you will find /export/home mount point for home directories.
So you can check and try like:
Code:
~# ls -ld /home
~# ls -ld /export/home
~# df -k /home /export/home
~# useradd -d /export/home/ram89 -m ram89
Last edited by shivaa; 02-01-2013 at 09:15 PM.
Reason: Added
No idea what you mean by "/home exit". And you were provided a link with some things to try...did you? If you're not going to provide any more information, there's little incentive for us to help, if we've got to try to pull things out of you.
Solaris uses /export/home normally, while it is possible to use just /home there are other things you have to do first. Quick and dirty you can manually create the home dir and leave off the -m then change ownership after creation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.