In Sun Solaris 10,
# useradd -D
Reads the entry from the following file /usr/sadm/defadduser
Output:
# useradd -D
group=other,1 project=default,3 basedir=/home
skel=/etc/skel shell=/bin/sh inactive=0
expire= auths= profiles= roles= limitpriv=
defaultpriv= lock_after_retries=
# cat /usr/sadm/defadduser
Output:
# Default values for useradd. Changed Tue Jul 28 04:28:53 2009
defgroup=1
defgname=other
defparent=/home
defskel=/etc/skel
defshell=/bin/sh
definact=0
defexpire=
defauthorization=
defrole=
defprofile=
defproj=3
defprojname=default
deflimitpriv=
defdefaultpriv=
deflock_after_retries=
This file can be customized by root user, to change the default parameters to 'useradd' command
For eg:
# vi /usr/sadm/defadduser
defgroup=104
defgname=solaris
defparent=/export/home
defskel=/etc/skel
defshell=/bin/bash
definact=0
defexpire=
defauthorization=
defrole=
defprofile=
defproj=3
defprojname=default
deflimitpriv=
defdefaultpriv=
deflock_after_retries=
:wq!
After saving the changes to the file,
# useradd -D
group=solaris,104 project=default,3 basedir=/export/home
skel=/etc/skel shell=/bin/bash inactive=0
expire= auths= profiles= roles= limitpriv=
defaultpriv= lock_after_retries=
I congrats to you for created the blog about Solaris Which may helpful to all...
ReplyDeleteinformative , i have a query , How i create a user account with root privileges ??
ReplyDeletei also hav a doubt....How to create a user account without using #useradd command...is it possible?
ReplyDeleteHi jacob , it is possible to create users without using useradd command ,
ReplyDeleteedit /etc/passwd file and add the user with default entry
and save the file , you can test it by #su username
Hi Guna, you can duplicate the id of to the other user, for eg;
ReplyDelete# useradd -m -d /export/home/user1 -u 0 -o user1
This will provide the root privileges to user1.
In another case, we can also create user a/c with providing authorization.
Hi Jacob,
As Guna said, you can edit the file.
Nor you can user SMC (Solaris Management Console) or #smuser command to create user account in Solaris.
thanx Guna & sir....but If we add lik this(editing /etc/passwd file),is it posssible to assign a home directory for that user?
ReplyDeleteHi Jacob,
ReplyDeleteNo it's not possible. Home directory has to be manually created and permissions/ownership has to be assigned accordingly to work with the home directory!
this is the best solution for solaris discussion. you have done a great job sir.
ReplyDeleten how r u sinto?
hello sir , can i have any other procedure , instead of duplicating root id ?????
ReplyDeleteHi Guna, give me some time let me check it out get to you. I think that it can be done through RDAC-authroization. Do you wanna to acquire all the previleges of root and only selected activities? Pls mention.
ReplyDeleteto guna........
ReplyDeletefine yaar...wht abt u?.........let me know whr r u frm?......n wht u r doing now?
This comment has been removed by the author.
ReplyDeleteworking as technical consultant for HP-UX , Linux , Vmware , citrix , sco ,unixware , iam from chennai , iam a student of kamalakannan , i completed linux in accel ,
ReplyDeletei want full privileges of root user , but i dont want to specify root id for created user .
RDAC or RBAC ??????
Sorry Guna! It's RBAC.
ReplyDeleteHi Guna,
ReplyDeleteIt's possible to give all root privilege to non-root user without duplicating the root id.
I checked thro' RBAC. IT's works!!!
hi sir i have newly joined to this blog
ReplyDeleteHi sir i would like to know how to mount pen drive in solaris9 and also device name of pen drive in solaris 9
ReplyDeleteIt's similar to mounting on Solaris-10.
ReplyDeletePlease ref to : http://solaris-unlimited.blogspot.com/2011/08/how-to-mount-removable-media-on-solaris.html