Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* problem with adding / deleting users
@ 2002-03-01 15:59 Eberhard Jopp
  2002-03-01 18:32 ` Adam Price
  0 siblings, 1 reply; 5+ messages in thread
From: Eberhard Jopp @ 2002-03-01 15:59 UTC (permalink / raw)


Hello,

I have a very strange phenomenon while adding / deleting users.
We have a DEC Alpha 2000 with Digital Unix 4.0d.

When I add a user with useradd john ...
the systems creates a line in /etc/passwd, a homedirectory and
everything seems to be okay.

But when I login as user john I get the following:

ALPHA> login john
Password:
Last login: Fri Mar  1 16:27:51 on ttyp4

Digital UNIX V4.0D  (Rev. 878); Sat Mar 27 20:29:06 MET 1999
*****************************************************
No terminfo database.
Cannot find termcap
ALPHA> pwd
/usr/users/john
ALPHA> whoami
staatz
ALPHA> echo "something" > text.txt
ALPHA> ls -l
total 2
drwxr-xr-x   2 staatz   users        512 Dec 30  1997 bin
-rw-r--r--   1 staatz   users         10 Mar  1 16:29 text.txt
ALPHA>

----------------------------------------------------------------------
The user is identified from the system as "staatz" - this is another
active and valid username.

Ok. I add the next user:

adduser harry ...

---------------------------------------------------------------------
# login harry
Password:
Digital UNIX V4.0D  (Rev. 878); Sat Mar 27 20:29:06 MET 1999
****************************************************************************
No terminfo database.
Cannot find termcap
ALPHA> whoami
seitz
ALPHA> pwd
/usr/users/harry
ALPHA> echo "what is" > text.txt
ALPHA> ls -l
total 2
drwxr-xr-x   2 seitz    users        512 Dec 30  1997 bin
-rw-r--r--   1 seitz    users          8 Mar  1 16:32 text.txt
ALPHA>

--------------------------------------------------------------------------

The user is identified from the system as "seitz" - this is another
active and valid username.

Then I decide to delete user john:
--------------------------------------------------------------------------
# whoami
root
# userdel john
userdel: Specified user not found.
#
# more /etc/passwd | grep john
john:idNBBpGnc2JEc:14927:15:john:/usr/users/john:/bin/sh
#
# more /etc/group | grep john
#
--------------------------------------------------------------------------

OK, I think I delete him in passwd, then:

--------------------------------------------------------------------------
# whoami
root
# more /etc/passwd | grep john
#
# login john
Password:
Last login: Fri Mar  1 16:28:46 on ttyp4

Digital UNIX V4.0D  (Rev. 878); Sat Mar 27 20:29:06 MET 1999
****************************************************************************
No terminfo database.
Cannot find termcap
ALPHA>
ALPHA> whoami
staatz
ALPHA> pwd
/usr/users/john
ALPHA>

-------------------------------------------------------------------------

john is still able to login to the system, although there is no entry
for him in passwd.

Does anyone knows why this happen and how can I fix it??

Many thanks

Eberhard Jopp



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with adding / deleting users
  2002-03-01 15:59 problem with adding / deleting users Eberhard Jopp
@ 2002-03-01 18:32 ` Adam Price
  2002-03-04 15:56   ` Eberhard Jopp
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Price @ 2002-03-01 18:32 UTC (permalink / raw)




"Eberhard Jopp" <eberhard.joppnospam@no_spam_benseler.de> wrote in message news:829v7u0ehstt5q9p2fdl75nuec2vlnuscj@4ax.com...
> Hello,
>
> I have a very strange phenomenon while adding / deleting users.
> We have a DEC Alpha 2000 with Digital Unix 4.0d.
>
> When I add a user with useradd john ...
> the systems creates a line in /etc/passwd, a homedirectory and
> everything seems to be okay.
>
> But when I login as user john I get the following:
>
> ALPHA> login john
> Password:
> Last login: Fri Mar  1 16:27:51 on ttyp4
>
> Digital UNIX V4.0D  (Rev. 878); Sat Mar 27 20:29:06 MET 1999
> *****************************************************
> No terminfo database.
> Cannot find termcap
> ALPHA> pwd
> /usr/users/john
> ALPHA> whoami
> staatz
> ALPHA> echo "something" > text.txt
> ALPHA> ls -l
> total 2
> drwxr-xr-x   2 staatz   users        512 Dec 30  1997 bin
> -rw-r--r--   1 staatz   users         10 Mar  1 16:29 text.txt
> ALPHA>
>
> ----------------------------------------------------------------------
> The user is identified from the system as "staatz" - this is another
> active and valid username.
>
This is caused by a duplicate uid, check the lines in /etc/passwd for
staatz and your new user john, they are almost certainly the same.



> Ok. I add the next user:
>
SNIP
Same problem, it seems that useradd is broken. Is useradd the one which is
a shell script or is that adduser I can never remember...

> Then I decide to delete user john:
> --------------------------------------------------------------------------
> # whoami
> root
> # userdel john
> userdel: Specified user not found.
> #
> # more /etc/passwd | grep john
> john:idNBBpGnc2JEc:14927:15:john:/usr/users/john:/bin/sh
> #
> # more /etc/group | grep john
> #
> --------------------------------------------------------------------------
>
> OK, I think I delete him in passwd, then:
>
> --------------------------------------------------------------------------
> # whoami
> root
> # more /etc/passwd | grep john
> #
> # login john
> Password:
> Last login: Fri Mar  1 16:28:46 on ttyp4
>
> Digital UNIX V4.0D  (Rev. 878); Sat Mar 27 20:29:06 MET 1999

This on the other hand is usually caused by a 'hashed' password file, look
for /etc/passwd.db and /etc/passwd.pag


Hope this helps
Adam
PS If you have enhanced security installed then all of this changes, so let us
know.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with adding / deleting users
  2002-03-01 18:32 ` Adam Price
@ 2002-03-04 15:56   ` Eberhard Jopp
  2002-03-04 20:50     ` Adam Price
  0 siblings, 1 reply; 5+ messages in thread
From: Eberhard Jopp @ 2002-03-04 15:56 UTC (permalink / raw)


On Fri, 1 Mar 2002 18:32:24 -0000, "Adam Price"
<adam+usenet@pappnase.co.uk> wrote:

>
>
>"Eberhard Jopp" <eberhard.joppnospam@no_spam_benseler.de> wrote in message news:829v7u0ehstt5q9p2fdl75nuec2vlnuscj@4ax.com...
>> Hello,
>>
>> I have a very strange phenomenon while adding / deleting users.
>> We have a DEC Alpha 2000 with Digital Unix 4.0d.
>>
>> When I add a user with useradd john ...
>> the systems creates a line in /etc/passwd, a homedirectory and
>> everything seems to be okay.
>>
>> But when I login as user john I get the following:
>>
>> ALPHA> login john
>> Password:
>> Last login: Fri Mar  1 16:27:51 on ttyp4
>>
>> Digital UNIX V4.0D  (Rev. 878); Sat Mar 27 20:29:06 MET 1999
>> *****************************************************
>> No terminfo database.
>> Cannot find termcap
>> ALPHA> pwd
>> /usr/users/john
>> ALPHA> whoami
>> staatz
>> ALPHA> echo "something" > text.txt
>> ALPHA> ls -l
>> total 2
>> drwxr-xr-x   2 staatz   users        512 Dec 30  1997 bin
>> -rw-r--r--   1 staatz   users         10 Mar  1 16:29 text.txt
>> ALPHA>
>>
>> ----------------------------------------------------------------------
>> The user is identified from the system as "staatz" - this is another
>> active and valid username.
>>
>This is caused by a duplicate uid, check the lines in /etc/passwd for
>staatz and your new user john, they are almost certainly the same.
>
>
>
>> Ok. I add the next user:
>>
>SNIP
>Same problem, it seems that useradd is broken. Is useradd the one which is
>a shell script or is that adduser I can never remember...
>
>> Then I decide to delete user john:
>> --------------------------------------------------------------------------
>> # whoami
>> root
>> # userdel john
>> userdel: Specified user not found.
>> #
>> # more /etc/passwd | grep john
>> john:idNBBpGnc2JEc:14927:15:john:/usr/users/john:/bin/sh
>> #
>> # more /etc/group | grep john
>> #
>> --------------------------------------------------------------------------
>>
>> OK, I think I delete him in passwd, then:
>>
>> --------------------------------------------------------------------------
>> # whoami
>> root
>> # more /etc/passwd | grep john
>> #
>> # login john
>> Password:
>> Last login: Fri Mar  1 16:28:46 on ttyp4
>>
>> Digital UNIX V4.0D  (Rev. 878); Sat Mar 27 20:29:06 MET 1999
>
>This on the other hand is usually caused by a 'hashed' password file, look
>for /etc/passwd.db and /etc/passwd.pag
>
>
>Hope this helps
>Adam
>PS If you have enhanced security installed then all of this changes, so let us
>know.
>
>
Hello Adam,

Thank you very much for your help.

I checked if there are duplicate UIDs in the passwd but I found none.
Then I looked for files in /etc. I found passwd.pag and passwd.dir.
man passwd leaded me to a command 'vipw'
man vipw 
told me that this programm creates or recreates  the hashed
passwd-database (Unfortunately I did not understand it completely). 
I executed 'vipw' , did nothing, but quit ':q'
and all my problems are solved: Deleted user cannot login to the
system and all user rights and permissions are correct.

The only thing is, that I do not understand what's going on ...

Greetings
Eberhard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with adding / deleting users
  2002-03-04 15:56   ` Eberhard Jopp
@ 2002-03-04 20:50     ` Adam Price
  2002-03-05  7:25       ` Eberhard Jopp
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Price @ 2002-03-04 20:50 UTC (permalink / raw)




"Eberhard Jopp" <eberhard.joppnospam@no_spam_benseler.de> wrote in message news:9h578ugqvkbcid7b0obmpoedkm2srb75j7@4ax.com...
> On Fri, 1 Mar 2002 18:32:24 -0000, "Adam Price"
> <adam+usenet@pappnase.co.uk> wrote:
SNIP

> >
> Hello Adam,
>
> Thank you very much for your help.
>
> I checked if there are duplicate UIDs in the passwd but I found none.
> Then I looked for files in /etc. I found passwd.pag and passwd.dir.
> man passwd leaded me to a command 'vipw'
> man vipw
> told me that this programm creates or recreates  the hashed
> passwd-database (Unfortunately I did not understand it completely).
> I executed 'vipw' , did nothing, but quit ':q'
> and all my problems are solved: Deleted user cannot login to the
> system and all user rights and permissions are correct.
>
> The only thing is, that I do not understand what's going on ...
>
The hashed password database (/etc/passwd.dir and /etc/passwd.pag) were
out of sync with /etc/passwd.
After you used vipw it re-ran the mkpasswd command to recreate the
hashed password database from the password file.
You could also have fixed it by manually running mkpasswd or by removing
/etc/passwd.dir and /etc/passwd.pag
Hope this helps
Adam




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem with adding / deleting users
  2002-03-04 20:50     ` Adam Price
@ 2002-03-05  7:25       ` Eberhard Jopp
  0 siblings, 0 replies; 5+ messages in thread
From: Eberhard Jopp @ 2002-03-05  7:25 UTC (permalink / raw)


On Mon, 4 Mar 2002 20:50:53 -0000, "Adam Price"
<adam+usenet@pappnase.co.uk> wrote:

>
>
>"Eberhard Jopp" <eberhard.joppnospam@no_spam_benseler.de> wrote in message news:9h578ugqvkbcid7b0obmpoedkm2srb75j7@4ax.com...
>> On Fri, 1 Mar 2002 18:32:24 -0000, "Adam Price"
>> <adam+usenet@pappnase.co.uk> wrote:
>SNIP
>
>> >
>> Hello Adam,
>>
>> Thank you very much for your help.
>>
>> I checked if there are duplicate UIDs in the passwd but I found none.
>> Then I looked for files in /etc. I found passwd.pag and passwd.dir.
>> man passwd leaded me to a command 'vipw'
>> man vipw
>> told me that this programm creates or recreates  the hashed
>> passwd-database (Unfortunately I did not understand it completely).
>> I executed 'vipw' , did nothing, but quit ':q'
>> and all my problems are solved: Deleted user cannot login to the
>> system and all user rights and permissions are correct.
>>
>> The only thing is, that I do not understand what's going on ...
>>
>The hashed password database (/etc/passwd.dir and /etc/passwd.pag) were
>out of sync with /etc/passwd.
>After you used vipw it re-ran the mkpasswd command to recreate the
>hashed password database from the password file.
>You could also have fixed it by manually running mkpasswd or by removing
>/etc/passwd.dir and /etc/passwd.pag
>Hope this helps
>Adam
>
Thanks,

now I'm completely satisfied (I hope my english is not too bad)

Eberhard


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-03-05  7:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-01 15:59 problem with adding / deleting users Eberhard Jopp
2002-03-01 18:32 ` Adam Price
2002-03-04 15:56   ` Eberhard Jopp
2002-03-04 20:50     ` Adam Price
2002-03-05  7:25       ` Eberhard Jopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox