Login to NIS (yp) client as user shows $USER as root!

Login to NIS (yp) client as user shows $USER as root!

Post by Rob » Tue, 17 Jul 2001 20:09:30



I've just setup NIS (yp).  When I login to a NIS client (workstation) as a
user defined in /var/yp/files/passwd and shadow, my environment shows that
i'm root ($USER).

If I login to the NIS server (master) as a NIS user my $USER is correct.

On the NIS client: echo $LOGNAME returns the correct value.  The group, gid
and uid are correct.

How do I fix this?

(I'm not NISing... yet:
timezone
auth_attr
exec_attr
prof_attr
user_attr
audit_user)

 
 
 

Login to NIS (yp) client as user shows $USER as root!

Post by Darren Dunha » Wed, 18 Jul 2001 01:35:39



> I've just setup NIS (yp).  When I login to a NIS client (workstation) as a
> user defined in /var/yp/files/passwd and shadow, my environment shows that
> i'm root ($USER).

Any chance you had an admin on that machine kill and restart inetd?

Don't do that.  Just kill -HUP it to reread the .conf file.

The inetd has likely inherited the admin's environment and is providing
it to all subprocesses (including telnetd and its subshell).  

You'll have to kill it and restart it with a cleansed environment
(likely with env -i) or reboot the machine.

Quote:> If I login to the NIS server (master) as a NIS user my $USER is correct.

I doubt your problem has anything to do with NIS.

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
          < How are you gentlemen!! Take off every '.SIG'!! >

 
 
 

Login to NIS (yp) client as user shows $USER as root!

Post by Rob » Thu, 19 Jul 2001 01:18:44


That's weird!  I rebooted the NIS client and now I have the correct login
username.  env -i didn't work.



> > I've just setup NIS (yp).  When I login to a NIS client (workstation) as
a
> > user defined in /var/yp/files/passwd and shadow, my environment shows
that
> > i'm root ($USER).

> Any chance you had an admin on that machine kill and restart inetd?

> Don't do that.  Just kill -HUP it to reread the .conf file.

> The inetd has likely inherited the admin's environment and is providing
> it to all subprocesses (including telnetd and its subshell).

> You'll have to kill it and restart it with a cleansed environment
> (likely with env -i) or reboot the machine.

> > If I login to the NIS server (master) as a NIS user my $USER is correct.

> I doubt your problem has anything to do with NIS.

> --

> Unix System Administrator                    Taos - The SysAdmin Company
> Got some Dr Pepper?                           San Francisco, CA bay area
>           < How are you gentlemen!! Take off every '.SIG'!! >

 
 
 

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. win9x pc's using internet via a linux box

3. NIS user cannot login to Solaris NIS client

4. CREDITS update

5. nis / yp: allowing users shell one one client, but not on the server?

6. Linus and Bill: Back to Back at Comdex

7. NIS/YP: local user cannot login

8. Upgrading XF86 3.3.6->4.0.2: undefined symbols

9. YP,NIS,user logins

10. Can't login as a user other than root user.

11. run a non-root user's program from a non-root user

12. Rhat 7.2 NIS client can't get users from FBSD 4.4 NIS Server