LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
LinkBack Search this Thread
Old 12-08-2005, 01:29 AM   #1
Paean
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Rep: Reputation: 0
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?

Thanks.
 
Old 12-08-2005, 03:58 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,165

Rep: Reputation: 243Reputation: 243Reputation: 243
Quote:
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.

Last edited by jlliagre; 12-08-2005 at 04:02 AM.
 
Old 12-09-2005, 12:45 AM   #3
Paean
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Smile Thanks.... but

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?
 
Old 12-09-2005, 01:20 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,165

Rep: Reputation: 243Reputation: 243Reputation: 243
Answers are in the source code comments:

http://cvs.opensolaris.org/source/xr...userdefs.c#140

Last edited by jlliagre; 05-09-2008 at 02:04 AM. Reason: fixed link
 
Old 12-09-2005, 01:36 AM   #5
Paean
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Brilliant! Thanks, I get it now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd jerryluis Fedora 9 03-27-2005 07:37 PM
Using Useradd spud Linux - Newbie 6 03-10-2005 03:50 PM
useradd cyrush Linux - Distributions 3 01-21-2003 09:40 PM
useradd with default values ?! realos Linux - Newbie 1 08-09-2002 07:38 AM
useradd qdickens Linux - General 4 11-02-2001 02:41 PM


All times are GMT -5. The time now is 12:00 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration