LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
Search this Thread
Old 10-23-2004, 11:19 PM   #1
zaicheke
Member
 
Registered: Apr 2004
Distribution: Slackware 10, Open BSD 3.6, Mac OS 10.3.7, Splack 10 beta
Posts: 393

Rep: Reputation: 30
Adding a new user in Solaris


I've never used useradd and i couldn't find an example in the man page.
Code:
useradd -d /home/john -s /bin/bash -u 102 john
passwd john
i can su into my user but i can't log in at the login screen. Would this code make a new user that i could login with? The login screen flashes like it's starting CDE but then resets the login.

Last edited by zaicheke; 10-23-2004 at 11:20 PM.
 
Old 10-24-2004, 05:11 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,499

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Did you create /home/john ?

Last edited by jlliagre; 10-24-2004 at 06:18 AM.
 
Old 10-24-2004, 05:16 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
The homedir is automatically created if you use the -m option that comes with useradd.

You don't need to re-create the user if you omitted the -m option. Just create the dir by hand and give the dir the correct user/group.

Hope this helps.
 
Old 10-24-2004, 06:27 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,499

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Assuming the missing home directory is the cause, I'd rather remove an recreate the user account, as the -m option is also automatically creating default .profile and local rc files.

If the automounter is in charge of the /home directory (autohome), and you are creating the user account on the NFS home server, use the -d option with /export/home/john as parameter, as in this case /home is unwriteable, even by root.
 
Old 10-24-2004, 11:36 AM   #5
zaicheke
Member
 
Registered: Apr 2004
Distribution: Slackware 10, Open BSD 3.6, Mac OS 10.3.7, Splack 10 beta
Posts: 393

Original Poster
Rep: Reputation: 30
I'm going to test it now with the -m command. I had manually created the directory before.
 
Old 10-24-2004, 01:04 PM   #6
zaicheke
Member
 
Registered: Apr 2004
Distribution: Slackware 10, Open BSD 3.6, Mac OS 10.3.7, Splack 10 beta
Posts: 393

Original Poster
Rep: Reputation: 30
I got it working, Thanks.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solaris end user installation UltraSoul Solaris / OpenSolaris 1 05-14-2005 01:39 AM
adding secondery ip to interface /solaris juanb Linux - Networking 1 04-14-2005 03:32 AM
User Creation in solaris siddhartha.das Solaris / OpenSolaris 3 03-05-2005 01:14 PM
Adding a user barrys Mandriva 2 11-16-2004 02:31 PM
First Time Solaris User zaicheke Solaris / OpenSolaris 7 08-16-2004 09:16 PM


All times are GMT -5. The time now is 01:08 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 Google+: linuxquestions
Open Source Consulting | Domain Registration