LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
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


Reply
  Search this Thread
Old 12-09-2005, 02:49 AM   #1
Paean
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Rep: Reputation: 0
Unhappy 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
 
Old 12-09-2005, 03:04 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Perhaps are you missing the useradd option that asks for the user's homedir creation ?

man useradd
 
Old 12-09-2005, 03:22 AM   #3
Paean
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 12-09-2005, 09:04 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 12-12-2005, 10:52 AM   #5
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
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
 
Old 12-12-2005, 02:27 PM   #6
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
The -m option is needed for the home directory to be created.
 
Old 12-12-2005, 03:28 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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)
 
Old 12-12-2005, 06:52 PM   #8
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
" 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
 
Old 12-13-2005, 01:03 AM   #9
Paean
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 12-30-2005, 02:13 PM   #10
G4george
Member
 
Registered: Nov 2005
Location: Houston, Tx
Posts: 34

Rep: Reputation: 15
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).
 
Old 01-03-2006, 02:09 PM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 01-18-2006, 12:28 PM   #12
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
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?
 
Old 01-18-2006, 12:48 PM   #13
G4george
Member
 
Registered: Nov 2005
Location: Houston, Tx
Posts: 34

Rep: Reputation: 15
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.
 
Old 01-31-2006, 04:06 PM   #14
javier.e.menendez
Member
 
Registered: Jan 2006
Posts: 168

Rep: Reputation: 30
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
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
S_ISDIR not working as expected. what is going on? zeppelin Programming 8 04-19-2007 10:21 AM
Crontab not working as expected nro Linux - Newbie 7 08-29-2005 12:56 PM
LinkSys EZXS55W not working as expected spaaarky21 Linux - Networking 2 09-05-2004 11:44 PM
chmod u+s not working as expected clinton Linux - Newbie 3 03-19-2004 07:49 PM
up2date not working as expected johnny13 Linux - Newbie 7 07-21-2003 01:15 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 06:03 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration