How to update passwd


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to update passwd
# 1  
Old 03-01-2006
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
# 2  
Old 03-01-2006
Check if you are on the NIS domain?

If you are login as a superuser and try

Code:
passwd -r files iachasta

# 3  
Old 03-02-2006
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.
# 4  
Old 03-02-2006
it seems that ur name has not been added into ur system file or group.
# 5  
Old 03-02-2006
Hello,

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

Regards,
# 6  
Old 03-02-2006
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 10:19 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

How to update Solaris 10 Update 3 to Update 11?

Hi friends, We have a Solaris machine running 10 update 3 -bash-3.2# cat /etc/release Solaris 10 11/06 s10s_u3wos_10 SPARC Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. ... (6 Replies)
Discussion started by: prvnrk
6 Replies

2. Red Hat

RedHat 5 update 9 BASH update issue

Hi i want to update the BASH because of the "shell shock" vulnerability. my RedHat 5 is clean install with the default mirror site. when im running the command: yum update bash im getting a message saying there is no update. you can see in the attach picture... what am i doing wrong? is... (4 Replies)
Discussion started by: guy3145
4 Replies

3. Programming

MYSQL - trigger update on record insert or update

Right I have a MYSQL database with table1 with 3 columns, colA, colB and colC. I want to combine the data in the 3 columns into a 4th column names col_comb. Here's the SQL command that works: UPDATE table1 SET `col_comb` = CONCAT( `colA` , ' - ', `colB` , ', ', `colC` ); So now I want this... (5 Replies)
Discussion started by: barrydocks
5 Replies

4. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

5. Solaris

Install update 6 on solaris with update 3

I want to update my solaris 10 server which is currently on update 3 stage. A new application require it to be on update 6. What is the best way to make it update 6. should i just install the patch or should i go for the liveupgrade?? thanks for you help in advance (3 Replies)
Discussion started by: uxravi
3 Replies

6. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

7. AIX

etc/passwd

Is there any way to allow users to access the etc/passwd file for commands like whoami but not be able to read the file? If I don't put a user in the security group and change the permissions on the etc/passwd file to 640 (rw-r-----) the users can login but the whoami command doesn't work for... (5 Replies)
Discussion started by: daveisme
5 Replies

8. Shell Programming and Scripting

script to update gecos in passwd file

Hello, I need to add information in the gecos of each login in the passwd file. I have expect installed. I thought about using expect to to read a file with the login names and the gecos information and then execute the command passwd with the -f option. The other option would be to read... (1 Reply)
Discussion started by: jyoung
1 Replies

9. UNIX for Advanced & Expert Users

no /etc/passwd

Hello ppl, A small mistake of mine has led the /etc/passwd file deleted. So i went to rescue mode and used the following command echo "root::0:0:Superuser:/:/bin/bash" > passwd but that did not get effect in anyway way. when I switch back to normal mode the root is still asking for a passwd.... (3 Replies)
Discussion started by: cyno
3 Replies
Login or Register to Ask a Question