[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

New user issue on Solaris

Posted on 2006-03-31
3
Medium Priority
?
291 Views
Last Modified: 2013-12-27
Hi Experts,

here is intro. when connecting by ssh.

> uname -a
SunOS 5.6 Generic_105181-30 sun4u sparc SUNW,ULtra-5_10

I edited the passwd file and created a new user:
test:x:1018:600:test:/home/test:/usr/bin/bash

Also group file:
rd::600:user1,user2,test

if I do:
>su test
I get:
test@server
which means I have logged in as test.

here is the problem, when I su as root and do"
>passwd test
I get
passwd(SYSTEM): test does not exist
Permission denied

I have tried it for another new account with same result.
Please help me understand what the problem is and how can I fix this.

thanks in advance.



0
Comment
Question by:mehranalmasi
3 Comments
 
LVL 14

Expert Comment

by:arthurjb
ID: 16348334
su test

does not mean you logged in as test.

I think that the problem is that you did not create an entry in the /etc/shadow file for your new user.  Solaris requires an entry in passwd and in shadow

Just copy an existing line and change the user to test and the uid to whatever you used in passwd...
0
 
LVL 21

Accepted Solution

by:
tfewster earned 600 total points
ID: 16349006
Please don't edit /etc/passwd unless you have to - there is a risk of corrupting it so noone can log in. Remove the line you created in the pasword file and use "useradd" instead:

useradd -u 1018 -g  600 -c test -d /home/test -m -s /usr/bin/bash test

"useradd" checks the uid isn't a duplicate, creates the entries in /etc/passwd, /etc/shadow & /etc/group, creates the home directory with correct ownership & permissions & copies the default .profile etc. Faster than doing it all manually and will less risk.
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 200 total points
ID: 16357015
If you add just an entry to /etc/passwd and not /etc/shadow, then you need to run

pwconv

which will create a /etc/shadow entry for any missing /etc/passwd entries.

You really should use 'useradd' to add users.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question