LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-06-2005, 09:55 AM   #1
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Rep: Reputation: 31
Solaris 10 NIS server configuration


I have installed the solaris10 X86 in my pc. And I want to make the PC as a NIS server.

I copy the source files from /etc and run the ypinit -m.
I do not find the source files of bootparams, ethers and netgroup. i am not sure if these files
effect the process of make.
The results are as follows:

#ypinit -m
In order for NIS to operate sucessfully, we have to construct a list of the
NIS servers. Please continue to add the names for YP servers in order of
preference, one per line. When you are done with the list, type a <control D>
or a return on a line by itself.
next host to add: unknown
next host to add: ^D
The current list of yp servers looks like this:

unknown

Is this correct? [y/n: y] y

Installing the YP database will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.

Do you want this procedure to quit on non-fatal errors? [y/n: n] y
The yp domain directory is /var/yp/inouelab
There will be no further questions. The remainder of the procedure should take
5 to 10 minutes.
Building /var/yp/inouelab/ypservers...
Running /var/yp /Makefile...
updated passwd
updated group
updated hosts
make: Warning: Don't know how to make target `/ipnodes'
Current working directory /var/yp
make: Warning: Don't know how to make target `/var/yp/ethers'
Current working directory /var/yp
updated networks
updated rpc
updated services
updated protocols
make: Warning: Don't know how to make target `/var/yp/netgroup'
Current working directory /var/yp
make: Warning: Don't know how to make target `/var/yp/bootparams'
Current working directory /var/yp
May 6 23:43:21 unknown sendmail[907]: [ID 702911 mail.alert] unable to qualify my own domain name (unknown) -- using short name
WARNING: local host name (unknown) is not qualified; see cf/README: WHO AM I?
/var/yp/inouelab/mail.aliases: 12 aliases, longest 10 bytes, 138 bytes total
/usr/lib/netsvc/yp/mkalias /var/yp/`domainname`/mail.aliases /var/yp/`domainname`/mail.byaddr;
updated aliases
make: Warning: Don't know how to make target `/var/yp/publickey'
Current working directory /var/yp
updated netid
/usr/sbin/makedbm /var/yp/netmasks /var/yp/`domainname`/netmasks.byaddr;
updated netmasks
couldn't find /var/yp/timezone
updated auto.master
updated auto.home
updated ageing
updated auth_attr
updated exec_attr
updated prof_attr
updated user_attr
updated audit_user
make: Warning: Target `all' not remade because of errors
Current working directory /var/yp
*** Error code 1
The following command caused the error:
if [ ! 1 ]; then make -k all; \
else make -k all NOPUSH=1;fi
make: Fatal error: Command failed for target `k'
Error running Makefile.
 
Old 05-06-2005, 12:11 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
"unknown" is not the best hostname you can use.
Did you really gave that name to your server ?
Has it a fixed address ?
 
Old 05-06-2005, 01:51 PM   #3
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
Fixed IP

Because I use the DHCP protocol i have a hostname of unknown. Then I use the sys-unconfig to fix the problem.
Now My host name is StayGreen whose IP is 192.168.0.9.
 
Old 05-07-2005, 03:29 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
This is odd, you can't (at least shouldn't) use an address obtained by dhcp to set a fixed IP.
 
Old 05-07-2005, 08:48 AM   #5
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
sys-unconfig

I use the sys-unconfig to reconfigure my solaris OS. NIS is used as Name Serivec. Hostname is set to StayGreen and IP is set to 192.168.0.9.
 
Old 05-07-2005, 09:24 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
What is in /etc/nodename ?
Why did you use ypinit, which goal is to configure a NIS client while I guess you really want to configure your PC as a NIS server ?
 
Old 05-07-2005, 09:51 AM   #7
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
More info

# less /etc/nodename
StayGreen
# hostname
StayGreen
#less /etc/defaultdomain
My_domain. .
## ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.9 netmask ffffff00 broadcast 192.168.0.255
ether 0:7:e9:15:6c:51

I want to configure my PC as a NIS server. Isn't "ypinit -m" for NIS server configuration?
I want to set a domain whose name is My_domain. And my pc provides other PCs a network name service.

I refer docs.sun.com which tell me to use "ypinit -m" to configure the NIS server and run /usr/lib/netsvc/yp /ypstart start for starting NIS service.

My goal:

Setting my pc as a NIS server also a file server. Any PCs in My_domain can automatically mount their home directory from my PC at boot time for login into
their home.
 
Old 05-07-2005, 12:05 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Ok, "ypinit -m" is indeed the right command to build a NIS server.

Is /etc/defaultdomain really containing "My_domain. ." with the final dots ?

Did you retry "ypinit -m" with giving "StayGreen" vs "unknown" as node to add ?

By the way, hostnames are case independant, so it should better be "staygreen" to avoid possible issues.
 
Old 05-07-2005, 01:59 PM   #9
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
The contents of /etc/defaultdomain is My_domain not inclouding dot.
I have retried to ypinit -m using StayGreen. And the fatal error occured in Make process. But I found that these errors do not effect the NIS server configuration.

Then I configured the client PC with Fedora core 3 installed as a NIS Client. During the booting of the client pc I can see the process of "listen to NIS server " and the home directory mounted from the NIS server are successful. But I can not login from the loging dialog box.
 
Old 05-07-2005, 02:52 PM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Is "ypcat passwd" from the FC client returning the user's entries ?
Perhaps is it necessary to put the nis user's password back from /etc/shadow to /etc/passwd file.
 
Old 05-08-2005, 09:19 AM   #11
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
<1> In My NIS server PC, I added a user named "testnis".
# cd /export/home
# ls -alF
total 52
drwxr-xr-x 6 root root 512 May 8 22:27 ./
drwxr-xr-x 3 root sys 512 May 7 01:34 ../
drwxr-xr-x 2 root root 512 May 7 17:32 TT_DB/
drwx------ 2 root root 8192 May 7 01:34 lost+found/
-rw-r----- 1 root root 173 May 8 22:26 nfslog
drwxr-xr-x 2 testnis other 512 May 8 22:52 testnis/

The content of /var/yp/PWS/passwd is as follows:
# less /var/yp/PWS/passwd
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:
uucp:x:5:5:uucp Admin:/usr/lib/uucp:
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
smmsp:x:25:25:SendMail Message Submission Program:/:
gdm:x:50:50:GDM Reserved UID:/:
nobody:x:60001:60001:NFS Anonymous Access User:/:
noaccess:x:60002:60002:No Access User:/:
testnis:x:100:1::/project/testnis:/bin/sh --------- This is the entry for my yp client.

<2>In my NIS client Pc, I mount the home directory of testnis into /project. I did as follwos:
#ypcat passwd ------- I have confirmed that testnis entry is in the output field.
#mkdir /project; mount staygreen:/export/home /project(Note:I have changed the hostname to staygreen)
#ls -alF | grep project
drwxr-xr-x 2 htt bin 512 May 8 22:52 testnis/ ------ I can not understand why the owner of testnis is htt:bin
#chown -R testnisther testnis ------- I also tried to do it as root, But no change to testnsi directory.

For the reason above I just can login as testnis by failsafe sesssion. I can not enter graphical session.

The error message is as follows:
Unalbe to creat ~/.gnome directory: Permission denied.
could not creat per-user gnome configuration directory: ' /usr/lib/im/.gnome': Permission denied.
 
Old 05-08-2005, 10:20 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Who is htt ?
Have you an entry with id 100 in your linux /etc/passwd file ?
What gives "ls -ldn /project/testnis" ?
 
Old 05-08-2005, 10:42 AM   #13
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
More info

This is the output from "ls -ldn /project/testnis"
# ls -ldn /project/testnis
drwxr-xr-x 2 100 1 512 May 8 23:13 /project/testnis/

Last edited by UltraSoul; 05-08-2005 at 10:45 AM.
 
Old 05-08-2005, 10:56 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
1) Have you an entry with id 100 in your linux /etc/passwd file ?

2) Log in again as testnis in a failsafe session and run these commands:
Code:
id
pwd
ls -lad . .??* *
touch test
Then post the results.
 
Old 05-08-2005, 11:22 AM   #15
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Original Poster
Rep: Reputation: 31
More info

sh-3.00$id
uid=100(htt) gid=1(bin) groups=1(bin) context=user_u:system_r:unconfined_t

sh-3.00$pwd
/project/testnis

sh-3.00$ls -lad . .??* *
total 14
drwxr-xr-x 2 htt bin 512 May 9 01:15 ./
drwxr-xr-x 6 htt bin 512 May 8 22:27 ../
-rw------- 1 htt bin 182 May 9 01:14 .bash_history
-rw-r--r-- 1 htt bin 136 May 8 22:12 .cshrc
-rw------- 1 htt bin 26 May 8 22:31 .dmrc
-rw-r--r-- 1 htt bin 157 May 8 22:12 .login
-rw-r--r-- 1 htt bin 174 May 8 22:12 .profile

sh-3.00$touch test
the test can be created without errors.

But I already can not enter the GNOME session with the user of testnis.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Security 2 03-31-2004 12:43 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Networking 1 03-31-2004 07:51 AM
How to setup a Solaris NIS client while with a Linux NIS server? ntcm Solaris / OpenSolaris 1 03-31-2004 06:10 AM
How to setup a Solaris NIS client while with a Linux NIS server? ntcm Linux - General 1 03-31-2004 06:10 AM
moving NIS server from Solaris to RH9 voda Linux - Networking 0 08-26-2003 08:57 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration