Avatar of amandowara
amandowaraFlag for India asked on

Solaris login problem

I could either create or reset any user accounts in a Solaris10 machine. It gives me the error "Cannot update system files - login cannot be created". The solution I got from Internet is to look for the existence of /etc/passwd and /etc/shadow file. But they are very much in tact. Can you give me a fix to resolve this?

Thanks,
AR
bash-3.00# useradd -m -d /users/rdashok rdashok
UX: useradd: ERROR: Cannot update system files - login cannot be created.
bash-3.00# passwd bsunkad
New Password:
Re-enter new Password:
passwd: Unexpected failure. Password database unchanged.
Permission denied
bash-3.00# ls -l /etc/passwd
-rw-r--r--   1 root     sys         1946 Nov 18 08:16 /etc/passwd
bash-3.00# ls -l /etc/shadow
-r--------   1 root     sys         1233 Nov 18 08:16 /etc/shadow
bash-3.00# ls -l /etc/group
-rw-r--r--   1 root     sys          368 Oct 10 17:37 /etc/group
bash-3.00# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c3t0d0s0    11093692 10749492  233264    98%    /

Open in new window

Unix OS

Avatar of undefined
Last Comment
amandowara

8/22/2022 - Mon
ittogo

The shadow file should be rw for root (chmod 600 /etc/shadow)
omarfarid

you don't have w perm on shadow file, chmod +w /etc/shadow
omarfarid

sorry, it should be chmod u+w /etc/shadow
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER
amandowara

Thanks for your response. But I don't think its a permission issue on /etc/shadow file. Since "password" command has suid set, it will have root previlage when it executes, but then it can write on /etc/shadow though it doesn't have write permission.
Anyways, i tried your solution, but it doesn't work though.
 bash-3.00# ls -l /etc/shadow
-rw-------   1 root     sys         1233 Nov 18 08:16 /etc/shadow
bash-3.00# useradd -m -d /users/rdashok rdashok
UX: useradd: ERROR: Cannot update system files - login cannot be created.
bash-3.00# passwd bsunkad
New Password:
Re-enter new Password:
passwd: Unexpected failure. Password database unchanged.
Permission denied
bash-3.00#
bash-3.00# ls -l /usr/bin/passwd
-r-sr-sr-x   1 root     sys        27220 Jan 22  2005 /usr/bin/passwd

 
ASKER CERTIFIED SOLUTION
Tintin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Tintin

What is the contents of

/etc/nsswitch.conf

omarfarid

Tintin is right about shadow file perms.

what are the perms of passwd command?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
amandowara

Tintin, Attached the details you asked for. I believe this is something to do with security or Pam related settings.
solaris-password-issue.txt
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
amandowara

Tintin, I found out the problem now using the 'pwck' output.  Whichever the account which doesn't have the Login directory is having issue and am trying to create user account in the same folder which is not exist. Hence after I corrected the home folder, it works.
Thanks for your help !
ASKER
amandowara

The output of 'pwck' command helped to fix the problem.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck