NIS+, User Ghosts, NIS Passwords

NIS+, User Ghosts, NIS Passwords

Post by argos.. » Sat, 15 Apr 2000 04:00:00



HI all,

We have a Sun server 5.6 with NIS running on it.

The task was to allow a user to log in to the machine.

He couldn't tunnel in to this machine, because he kept
getting prompted for the NIS password.  I couldn't change
it remotely either.  So, I just drove over to the site,
and logged on as root.

I thought, just delete him, and then recreate him,
which I did with admintool.  There was no entry
in either the /etc/passwd, or /etc/shadow files.

However, this guy was a ghost.  A dispuid revealed him,
along with a whole bunch of the other dead names.

Then, while logged in as root, I used the su command
to change to this supposedly extinct user.  And I
was logged in as him, with the extinct UID!  What's
going on here?

# su rich
$ id
uid=1004(rich) gid=101(dba)

But, yppasswd didn't work.  (Perhaps I should have:
su - rich )

$ yppasswd
yppasswd:  Changing password for root
passwd(SYSTEM):  root does not exist
Permission denied

We want to delete all traces of this guy, and
recreate him in the normal manner, without any nis+.
How can I do it?

Thanks,

Argosy

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

NIS+, User Ghosts, NIS Passwords

Post by Tony » Wed, 19 Apr 2000 04:00:00


Argosy,

I'm new to monitoring unix newsgroups.  I've only been a sys admin for a
little more than a year, but I had the SAME problem when I first took
control of a couple of servers that were running Solaris 2.5.1 and using
NIS+.  Someone who left our office, but who had stayed with another part
of the organization, told me that I had forgotten to delete her
account.  But, I definitely did delete the account.

Then I experimented with my personal account and the same thing
happened.  Even though I had deleted the account and there was no entry
for me in /etc/passwd and no entry in /etc/shadow files, I was still

Well, to make a long story, short NIS+ had everything to do with it.  To
make matters worse, my Department of Defense organization uses a special
interface that enhances security and helps ensure that the thousands of
systems in our classified network will appear and behave the same way,
but this special interface (they call it DII COE ... maybe you've heard
of it) just makes things a little more complicated for the sys admin.
It's great for the users, but not for me.

Let me get to the point.  If you're using NIS+, I think you should begin
with doing a:
    niscat passwd.org_dir

If you're running yp, find the correct command to do the equivalent.

That should display the NIS+ password file and I suspect that you'll see
an entry for your "ghost" accounts.  If you don't find an entry there
for those accounts, I'm lost and completely unable to help.

If there is indeed an entry for the "ghosts," you need to run the
appropriate commands to get them out of the NIS+ passwd file.  I think
you'll need the "nistbladm" command or the yp equivalent.  I don't
remember the exact syntax, but you want to use the "-r" option to remove
the entry for each of the "ghost" accounts.

That ought to prevent them from logging in, but you may have a slightly
bigger problem.  Apparently, admintool is not touching your NIS
environment when you remove accounts.  I have the same problem myself,
apparently because I'm using our account manager utility improperly, or
it's buggy.  We don't use admintool.  Consequently, although you've
deleted the UNIX part of the account (passwd and shadow file entries),
you haven't removed their NIS credentials.  That would permit the
deleted users to continue logging into your system.

Therefore, you need to perfect some procedure to remove accounts that
will also cover your NIS tables, otherwise, you'll continue to have the
problem.

Please let me know how this turns out.  I'd like to know if I helped set
you in the right direction.

Tony
______________________________________________


> HI all,

> We have a Sun server 5.6 with NIS running on it.

> The task was to allow a user to log in to the machine.

> He couldn't tunnel in to this machine, because he kept
> getting prompted for the NIS password.  I couldn't change
> it remotely either.  So, I just drove over to the site,
> and logged on as root.

> I thought, just delete him, and then recreate him,
> which I did with admintool.  There was no entry
> in either the /etc/passwd, or /etc/shadow files.

> However, this guy was a ghost.  A dispuid revealed him,
> along with a whole bunch of the other dead names.

> Then, while logged in as root, I used the su command
> to change to this supposedly extinct user.  And I
> was logged in as him, with the extinct UID!  What's
> going on here?

> # su rich
> $ id
> uid=1004(rich) gid=101(dba)

> But, yppasswd didn't work.  (Perhaps I should have:
> su - rich )

> $ yppasswd
> yppasswd:  Changing password for root
> passwd(SYSTEM):  root does not exist
> Permission denied

> We want to delete all traces of this guy, and
> recreate him in the normal manner, without any nis+.
> How can I do it?

> Thanks,

> Argosy

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

1. NIS+ user management [Was: Re: root changing a user's password (NIS)]


And Solaris 2 removed `passwd -f <filename>'; the "-f" option now
means "force password change at next login".

                                  .  What other ways are there that are safer?

Good question.  I haven't used Solaris 2 at a large site long enough
for it to be much of an issue.  When necessary, I've just done as you
and edited the file by hand (using Emacs, which when saving at least
gives warning if the file's been changed).  Several years ago at Sun,
I recall there being a `viyp' utility for editing NIS files.  Maybe
they made it publically available.  I think it's harder to enforce
such a utility's use than it is to write one. ;-)

On a related note -- what is the recommended/approved/best way to add
new users and remove ex-users to/from NIS+ ??  One would hope `useradd'
could do it -- nope.  The NIS+ utilities `nis{addent,populate}' are
tailored towards adding to NIS+ tables from ASCII files or NIS maps
rather than dealing with a single "user" entry.  And using plain
`nistbladm' and `nisaddcred' options is crude and error-prone.

I've searched to no avail for some "cookbook" method of handling NIS+
user management.  My old NIS+ book was useless for that issue.  Maybe
I just have a blind spot.  Any suggestions would be appreciated...
thanks!

-sjk

--
Scott J. Kramer                         Graham Technology Solutions
Sr. UNIX Systems Administrator          20823 Stevens Creek Blvd., Suite 300

http://www.graham.com                 +1.408.366.8001

2. Frontpage + Apache

3. NIS/NIS+ password security without user keypairs -- how ???

4. Soundscape support

5. Can't change NIS+ password in NIS+ client

6. Kernel panic!

7. Help: NIS+ password information update failed while talking to NIS+ passwd daemon

8. chroot

9. NIS/NIS+ secure passwords

10. NIS/NIS+ password aging

11. NIS password not updating right away on NIS client running CentOS

12. Linux NIS with Solaris NIS+ server, password problems.

13. password sync without NIS/NIS+????