Useradd - Cannot locate /etc/default/useradd in Solaris
Solaris / OpenSolarisThis forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.
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.
Useradd - Cannot locate /etc/default/useradd in Solaris
Hi,
This might be a remarkably silly question, but I am a total newbie to all things linux... so please excuse me
I am aware that to set up default values for all new users you have to edit the properties specified in the /etc/default/useradd file. But I haven't been able to find this file on the Solaris installation. If I create this file, will it be used when I call the useradd command, or does this have to be configured somewhere as well. (If so, where?). Alternatively am I completely wrong & does Solaris handle this differently?
I am aware that to set up default values for all new users you have to edit the properties specified in the /etc/default/useradd file.
This is the way it works under Linux.
Solaris uses useradd -D for the same purpose whose backend file is /usr/sadm/defadduser.
This file may be directly modified for some parameters, as there is no published interface to change the default shell, for example.
Thanks for the response, that helps a lot. On the one machine running Solaris I have managed to find the /usr/sadm/defadduser and make my changes, but on the other it does not exist. I assume if I run the useradd -D command and change a default value it would create this file automatically.
But as a matter of interest:
1. If I created the file myself with the correct entries, would I have to make any configuration changes to get useradd to read the file when used?
2. How come the useradd function works without the file being there? What default values is it using if the aren't any specified as the file does not exist?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.