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
Avatar of ittogo
ittogo

The shadow file should be rw for root (chmod 600 /etc/shadow)
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

you don't have w perm on shadow file, chmod +w /etc/shadow
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

sorry, it should be chmod u+w /etc/shadow
Avatar of amandowara
amandowara
Flag of India image

ASKER

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
Avatar of Tintin
Tintin

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Tintin
Tintin

What is the contents of

/etc/nsswitch.conf

Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Tintin is right about shadow file perms.

what are the perms of passwd command?
Avatar of amandowara
amandowara
Flag of India image

ASKER

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
Avatar of Tintin
Tintin

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of amandowara
amandowara
Flag of India image

ASKER

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 !
Avatar of amandowara
amandowara
Flag of India image

ASKER

The output of 'pwck' command helped to fix the problem.
Unix OS
Unix OS

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

33K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo