[Solaris 10]NIS works only from "su"


 
Thread Tools Search this Thread
Operating Systems Solaris [Solaris 10]NIS works only from "su"
# 1  
Old 04-01-2009
[Solaris 10]NIS works only from "su"

Hi,
I'm trying to set up NIS in my Solaris 10 but it works only if I 1st login as a root to my server and then "su - myuser". When I try to login (via console or ssh) directly as "myuser" the authentication fails.

Here is what I've done:

Code:
client ~$ echo "mydomain.loc" > /etc/defaultdomain
client ~$ domainname mydomain.loc
client ~$ domainname
mydomain.loc

client ~$ echo "192.168.0.1   nis.mydomain.loc" >> /etc/hosts

client ~$ ypinit -c
## add nis.mydomain.loc

# added "nis" in /etc/nsswitch.conf on the following lines
passwd:     files nis
group:      files nis


client ~$ svcadm enable nis/client
client ~$ ypwhich
nis.mydomain.loc

~$ ypcat passwd
## displays the passwd entries

client ~$ su - myuser
myuser@client ~$


What am I doing wrong ?

Thanks for your help.

Tex
# 2  
Old 04-01-2009
If your "ypcat passwd does not include displaying the users' encrypted passwords then:

I'm rusty in this now but you need to copy your /etc/passwd, /etc/shadow and /etc/group files to a separate directory into which you have also copied the NIS Makefile and then run make to populate the NIS database with your users (from passwd) and their passwords (from shadow). If your users have NFS mounted home directories from a central NFS file server you may want to put the auto_home map file into NIS as well.

NIS is no longer in favour because someone may run:
Code:
$ ypcat passwd > textfile.txt

and the run cracker against the text file to determine the users passwords because NIS makes the users' encrypted password world readable.

I hope this gives you some helpful pointers...
# 3  
Old 04-02-2009
Quote:
Originally Posted by TonyFullerMalv
If your "ypcat passwd does not include displaying the users' encrypted passwords then:
No it doesn't. I think that I now understand the problem: I can access the uids but not the hashed passwords. When I'm root I can su to anybody without any password verification. When I connect as a user, the credentials has to be checked and I do not have the NIS passwords.

Quote:
Originally Posted by TonyFullerMalv
I'm rusty in this now but you need to copy your /etc/passwd, /etc/shadow and /etc/group files to a separate directory into which you have also copied the NIS Makefile and then run make to populate the NIS database with your users (from passwd) and their passwords (from shadow).
If I uderstand, this should be done on the NIS server but I don't have an admin access to the server and even if I had I do not want to "unshadow" the passwords for the security reasons you mention later.

Quote:
Originally Posted by TonyFullerMalv
If your users have NFS mounted home directories from a central NFS file server you may want to put the auto_home map file into NIS as well.
Yes I've already set up this and it works ok.


So any idea how I can fix the password problem ?

Thanks,
Tex
# 4  
Old 04-02-2009
You cannot unshadow NIS except by moving to NIS+ which is complicated and Sun have or are in the process of dropping support for NIS+, I believe an LDAP server (e.g. Sun ONE Directory Service, see: http://docs.sun.com/source/816-6698-10/useracct.html ) is the way to go now.

On the getting the user's passwords included into NIS, it does have to be done on the NIS server so if you do not have root on the NIS server then you will need to ask those who do have root on the NIS server to remake the NIS maps to include a copy of /etc/shadow.

Last edited by TonyFullerMalv; 04-02-2009 at 04:56 PM..
# 5  
Old 04-03-2009
Quote:
Originally Posted by TonyFullerMalv
On the getting the user's passwords included into NIS, it does have to be done on the NIS server so if you do not have root on the NIS server then you will need to ask those who do have root on the NIS server to remake the NIS maps to include a copy of /etc/shadow.
It is supposed to be included. From Linux machine it works fine. I think that the problem comes from the fact that the NIS server is a Linux OS which doesn't seem to be compatible with Sun nis client.

Thanks anyway,
Tex
# 6  
Old 04-06-2009
Hi Tex

The password display issue in NIS can be resolved by creating a passwd.adjunct file in the NIS server.

You can get a lot of help on passwd.adjunct file from the net. I recently configured an NIS environment on my lab (of around 10 machines) and they are running pretty fine.

HG
# 7  
Old 04-06-2009
Quote:
Originally Posted by Renjesh
Hi Tex

The password display issue in NIS can be resolved by creating a passwd.adjunct file in the NIS server.

You can get a lot of help on passwd.adjunct file from the net. I recently configured an NIS environment on my lab (of around 10 machines) and they are running pretty fine.

HG
ok. Do you also have a Linux server with Solaris clients ?

regards,
Tex
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

"Mv" command does not work in loop, but works manually

Hi there, this may be a beginner's error, but I've been unable to find a solution on my own and by googling, and now I am really stuck on it. I am simply trying to move directories called for example CAT_Run01.ica to a directory with the corresponding number, Run01, in the same directory. For... (2 Replies)
Discussion started by: andrevol
2 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. Solaris

Printer configuration Migration from Solaris 10 "LP" to Solaris 11 "CUPS"

Need to find a way to import an LP printers.conf file to CUPS. I have some new Solaris 11.1 boxes that need to have 300 printers added. (0 Replies)
Discussion started by: os2mac
0 Replies

4. Red Hat

files having Script which works behind "who" & "w" commands

Dear All, plz print the path of files which have the script of "who" & "w" commands. thnx in advance. (6 Replies)
Discussion started by: saqlain.bashir
6 Replies

5. UNIX for Dummies Questions & Answers

1 SSH tunnel, 2 devices: 1 "just works," other gets challenged

summary: I have 2 devices on same LAN which tunnel through one gateway to a cluster, using ssh with public keys for password/passphrase-less login. I configured both devices, and those ssh configurations are nearly identical with regard to ssh. From either device I can shell into the cluster.... (2 Replies)
Discussion started by: TomRoche
2 Replies

6. UNIX for Dummies Questions & Answers

script works well but displays " line 6: =: No such file or directory"

strange :) can you tell why?:cool: #!/bin/bash echo " enter your age " read age if ; then echo " you do not have to pay tax " elif ]; then echo " you are eligible for income tax " else echo " you dont have to pay tax " fi (3 Replies)
Discussion started by: me.
3 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. Solaris

NIS master "ypwhich can't communicate with rpcbind"

Hello All, I just tried to create NIS master in my x86 vmware machine. I have followed the steps and created the necessary files and installed via ypinit command. Now the issue is after start the services when provide the ypwhich command showing following error. Please assist. bash-#svcs... (1 Reply)
Discussion started by: gowthamakanthan
1 Replies

9. Shell Programming and Scripting

"ld.so.1" error using a cron job | works fine otherwise

Hi, A cron job CJ invokes a shell script SC. SC internally invokes multiple perl scripts. One of the perl scripts deals with Accurev (i am using Accurev CLI). The first accurev command encountered is accurev merge -i <<file_name>> (file name has absolute path) When I run the perl script or... (1 Reply)
Discussion started by: singh
1 Replies

10. UNIX for Advanced & Expert Users

"kill -14 pid" doesn't works on all processes !!

If I try to run "kill -14 pid", some processes in my application get terminated , while some keeps running. If SIGALRM signal is sent, they should make an exit. What's the reason any process keeps on running. (1 Reply)
Discussion started by: poojac
1 Replies
Login or Register to Ask a Question