Solaris / OpenSolaris This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-09-2005, 02:49 AM
|
#1
|
LQ Newbie
Registered: Dec 2005
Posts: 12
Rep:
|
Useradd - not working as expected
Hi,
Yet another useradd question from me....
I have set the following parameters in the /usr/sadm/defadduser:
defgroup=1
defgname=other
defparent=/export/home
defskel=/etc/skel
defshell=/bin/bash
But when I run useradd X, the folder /export/home/X does not get created as expected. (No folder, no .bash_profile or any other expected contents). I have run a find command to see if the folder was created elsewhere, but it hasn't been. However, there is an entry in the /etc/passwd file for user X. I have tried the equivalent on a linux box & it works perfectly. I'm not sure what I am missing for Solaris.
Thanks
|
|
|
12-09-2005, 03:04 AM
|
#2
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Perhaps are you missing the useradd option that asks for the user's homedir creation ?
man useradd
|
|
|
12-09-2005, 03:22 AM
|
#3
|
LQ Newbie
Registered: Dec 2005
Posts: 12
Original Poster
Rep:
|
Thanks
Thanks for the help. Is there somewhere that all these minor differences between Solaris & Linux is documented? I have instructions from people who have worked in Linux but not in Solaris, so all these little issues crop up & they don't have solutions and since I am still learning... I resort to forums, but I hate bothering the forum people with silly questions.
Thanks for the patience though, much appreciated.
|
|
|
12-09-2005, 09:04 AM
|
#4
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
You are not bothering me, no problem
I don't know of a site where these slight (or bigger) differences are documented, they are spreaded all over everywhere.
I feel some differences exist between different Gnu/Linux distributions too, not to mention *BSDs.
|
|
|
12-12-2005, 10:52 AM
|
#5
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
Paean , have u try this way
useradd -d /export/home/paean -m -s /bin/ksh -c "Paean Surname" paean
in my opinion some advance users (not all) wont help much about small matter
force ppl go to read eg, google or man page ,why not just give straight command then user can figure out" why is that or like that" one thing i sure is the advance user wont make fool with new user, because if they make they will get reported
ah sometime i cant imagine i regret with it
sorry no argue with me, i am new too
|
|
|
12-12-2005, 02:27 PM
|
#6
|
Member
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683
Rep:
|
The -m option is needed for the home directory to be created.
|
|
|
12-12-2005, 03:28 PM
|
#7
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Quote:
in my opinion some advance users (not all) wont help much about small matter force ppl go to read eg, google or man page ,why not just give straight command then user can figure out" why is that or like that"
|
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. (chinese proverb)
|
|
|
12-12-2005, 06:52 PM
|
#8
|
Member
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Rep:
|
" Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. (chinese proverb)"
now here i agree 200% with u as u said . that y , i teach him the command and let him do himself and not me do for him on his computer or server
so if any advance users feel they are good or ego with that , remove it , its not good for communittee
and if that person , any command they proceed / tell / help users kindly explain if posible
|
|
|
12-13-2005, 01:03 AM
|
#9
|
LQ Newbie
Registered: Dec 2005
Posts: 12
Original Poster
Rep:
|
Quote:
Perhaps are you missing the useradd option that asks for the user's homedir creation ?
man useradd
|
Hi,
I just want to state that jlliagre advice as quoted was extremely helpful because I hadn't realised how different Solaris and Linux are until then. So being sent to the man pages showed me that, I always feel being given a direction is better than being given the answer. As in I may not know something because I don't know where to look, but once I have a place to look I can figure it out for myself which is extremely satisfying.
Thanks for all the responses though, it is appreciated.
|
|
|
12-30-2005, 02:13 PM
|
#10
|
Member
Registered: Nov 2005
Location: Houston, Tx
Posts: 34
Rep:
|
You gentlemen need to learn how to cheat!!
Solaris (if you have X running) has a program called admintool. With this you can do all the user admin with ease and it will prompt when you don't do something correctly. (most of the time).
|
|
|
01-03-2006, 02:09 PM
|
#11
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
admintool is deprecated in Solaris 10, and no more in Solaris Express.
If you insist using a GUI, there is something called smc that is some kind of admintool replacement.
|
|
|
01-18-2006, 12:28 PM
|
#12
|
Member
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170
Rep:
|
Quote:
Originally Posted by jlliagre
admintool is deprecated in Solaris 10, and no more in Solaris Express.
If you insist using a GUI, there is something called smc that is some kind of admintool replacement.
|
What System Admin would use a GUI when there is a perfectly good command line available? 
|
|
|
01-18-2006, 12:48 PM
|
#13
|
Member
Registered: Nov 2005
Location: Houston, Tx
Posts: 34
Rep:
|
After 15 years of being beaten about the head by NT (which I think stands for Neanderthal Technology) people I sometimes stoop to their level and use it.
|
|
|
01-31-2006, 04:06 PM
|
#14
|
Member
Registered: Jan 2006
Posts: 168
Rep:
|
try this if you will:
useradd -u 100 -g 10 -md /export/home/user1 -c "whatever" -s /bin/bash user1
passwd user1
Password aging is optional:
passwd -x 14 -n 7 -w 3 user1
usermod -f 31 -e 12/31 user1
The last two store settings in /etc/shadow which force the user to change his password every 2 weeks, keep the new one for 7 days, and locks the account on 12/31
of the current year. -f 31 locks the account after 31 days of inactivity.
I am not saying to do do, you just wanted to learn other options. Hope they help
|
|
|
All times are GMT -5. The time now is 05:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|