The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to update gecos in passwd file jyoung Shell Programming and Scripting 1 03-05-2008 11:45 AM
etc/passwd nguda UNIX for Dummies Questions & Answers 2 07-03-2003 06:38 AM
passwd geoquest UNIX for Dummies Questions & Answers 2 01-13-2003 11:40 AM
passwd Erwin Stocker UNIX for Advanced & Expert Users 5 10-09-2002 03:33 AM
passwd vtran4270 UNIX for Advanced & Expert Users 3 09-04-2002 11:47 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-01-2006
Registered User
 

Join Date: Feb 2006
Posts: 52
How to update passwd

I created a new user for my SUN machine for eg iachasta

1.) added the entry in the /etc/passwd file with corresponding group Id.
2.) The resp group Id was added in /etc/group file.
3.) I made entry in /etc/shadow file also .

i am able to login with user iachasta as

su - iachasta
whenever i tried to change the passwd the following message appear .

# passwd iachasta
passwd(SYSTEM): iachasta does not exist
Permission denied


Request you to pls help in the same.

Regards,

Aparna
Reply With Quote
Forum Sponsor
  #2  
Old 03-01-2006
Registered User
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 156
Check if you are on the NIS domain?

If you are login as a superuser and try

Code:
passwd -r files iachasta
Reply With Quote
  #3  
Old 03-02-2006
Registered User
 

Join Date: Feb 2006
Posts: 52
Its not working yet , i really dont know where z is problem coming as the user group and shadow files are as follows :

/etc/passwd
root:x:0:1:Super-User:/:/sbin/sh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
smtp:x:0:0:Mail Daemon User:/:
uucp:x:5:5:uucp Admin:/usr/lib/uucp:
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
listen:x:37:4:Network Admin:/usr/net/nls:
nobody:x:60001:60001:Nobody:/:
noaccess:x:60002:60002:No Access User:/:
nobody4:x:65534:65534:SunOS 4.x Nobody:/:
tjob:x:100:900:User for Time Job administration:/oms_var/tjob:/bin/sh
atop:x:101:900:User for ATOP administration:/oms_var/atop:/bin/sh
uatop:x:102:900:User for UNIX-ATOP:/oms_var/uatop:/bin/sh
emnadm:x:103:1::/oms_var/emnadm:/bin/sh
omc:x:104:900::/home/omc:/bin/sh
test2:x:556:107::/opt:/bin/ksh

/etc/group
root::0:root
other::1:
bin::2:root,bin,daemon
sys::3:root,bin,sys,adm
adm::4:root,adm,daemon
uucp::5:root,uucp
mail::6:root
tty::7:root,tty,adm
lp::8:root,lp,adm
nuucp::9:root,nuucp
staff::10:
daemon::12:root,daemon
sysadmin::14:
nobody::60001:
noaccess::60002:
nogroup::65534:
oms::900:
switch::105:
in::106:
inNSS2004::102:
test::100:
as::107:

etc/shadow
root:eR72..kxktN42:11527::::::
daemon:NP:6445::::::
bin:NP:6445::::::
sys:NP:6445::::::
adm:NP:6445::::::
lp:NP:6445::::::
uucp:NP:6445::::::
nuucp:NP:6445::::::
listen:*LK*:::::::
nobody:NP:6445::::::
noaccess:NP:6445::::::
nobody4:NP:6445::::::
tjob:*LK*:11818::::::
atop:*LK*:11818::::::
uatop:*LK*:::::::
emnadm:*LK*:11818::::::
omc:d9FZnfitKORhs:11818::::::
test2::::::::


Pls help me out...

Thnks in advance.
Reply With Quote
  #4  
Old 03-02-2006
Registered User
 

Join Date: Feb 2006
Location: JP.Tokyo
Posts: 30
it seems that ur name has not been added into ur system file or group.
Reply With Quote
  #5  
Old 03-02-2006
Registered User
 

Join Date: Feb 2006
Posts: 52
Hello,

i have update the username as test2 .And still passwd is not changing

Regards,
Reply With Quote
  #6  
Old 03-02-2006
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
First - make backup copies of your /etc/passwd and /etc/shadow files as this procedure will destroy them. Second, see if your version of OS supports the pwconv command.

From Sunsolve:
Quote:
The problem may be an incorrect line in the passwd file anywhere above the line
on which the user is listed. In this case, the passwd file entry 10 lines above
was missing a colon. Replacing that colon fixed the problem.

To determine WHERE in the passwd file the problem is, make copies of both the
passwd and shadow files, then enter

pwconv

Then, when you look at the passwd file, you will see that the line with the
problem
and all lines below that point will be missing. Now, of course, you'll have to
copy back the original passwd and shadow files, but you'll know what line the
syntax error is on.
And just from looking at your output, you are missing smtp from the shadow file.

Last edited by RTM; 03-02-2006 at 07:19 AM.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0