[comp.sys.next] Simple System Question

beaucham@uxh.cso.uiuc.edu (12/18/90)

I just got my '30 Promotion' cube, and I want to set it up as a multi-user
system.  I find that after building my 660 MB HD that about 2/3 of it is
mounted on '/' and the rest is mounted on '/clients'.  I installed a user
account using the NeXT built in application and tried to force to put the
home directory under '/u1' (after I did a mkdir to create /u1.).  However,
the system insists on putting the user area directly under root.  Login works 
o.k., but I don't understand why the user account is not given in /etc/passwd.

In summary, my questions are:

1) What is the '/clients' directory system supposed to be used for?

2) How do you install a user area other than right under root?

3) Why don't new users have their names listed in /etc/passwd?

Since NeXT has no hot line, I have to ask you guys!

Jim Beauchamp	j-beauchamp@uiuc.edu

smithw@hamblin.math.byu.edu (Dr. William V. Smith) (12/18/90)

Well, I tried email, but could not get it to work [something about
mailbox not found <beaucham@uxh.cso.uiuc.edu>].  Anyway, you
might try to mail me, if you are not already flooded with reponses.
-Bill-
--
            __________________Prof. William V. Smith____________________
EMail:  smithw@hamblin.math.byu.edu  or  uunet!hamblin.math.byu.edu!smithw
SMail:          Math Dept. -- 314 TMCB; BYU; Provo, UT 84602 (USA)
NeXTmail:                   smithw@mathnx.math.byu.edu
Phone:            +1 801 378 2061         FAX:  +1 801 378 2800

cpenrose@sdcc13.ucsd.edu (Christopher Penrose) (12/19/90)

In article <72100017@uxh.cso.uiuc.edu> beaucham@uxh.cso.uiuc.edu writes:
>In summary, my questions are:
>
>1) What is the '/clients' directory system supposed to be used for?
>
>2) How do you install a user area other than right under root?
>
>3) Why don't new users have their names listed in /etc/passwd?

I may have a few answers.  I remember being in your position when
I just got my cube!  Anyway,  the manuals have these answers as I
discovered, but I think exposing the NeXT's idiosyncracies is 
worth the bandwidth on the net.

You have discovered the liabilities of NetInfo, or Network Information
database.  New users are added directly to a database and are not
automatically updated in /etc.  I hope this is "corrected" or made an
option in 2.0.  

Anyway, your /clients partition can really be used for anything.  It could
be used for home directories if you wish.  You can change its name with 
"mv" and by updating the /etc/fstab.  You might want to check to see if 
"fstab" is a field of the NetInfo database also (like /etc/passwd).  I am 
not sure at this point; my machine is at home.  Here is a way to install 
user directories in another location:

edit the /etc/passwd file
hegel% emacs /etc/passwd

upload the database
hegel% niload passwd . < /etc/passwd
 
if you want /etc/passwd to reflect all the current users, you can dump
the database to that file:

hegel% nidump passwd . > /etc/passwd

If this is not clear enough, or you have problems, check the Netinfo 
section of the NeXT system manuals.

If you are starting to use your cube, you can repartition your hard drive
to have a single partition, or other configurations.  I have a single
partition on my 330 because it gives me a large amount of flexibility.
On your drive,  I would probably create three partitions:

/:		this would be close to 500 megs
/private:	about 60 megs for swap space
/homey:		this would be for users

These are only suggestions.  I would make a seperate swap partition
only to avoid dumping it when doing backups.  The seperate user partition
is optional in my mind, but it could be useful for backups also.  I 
have mentioned these configuration options only to suggest that you have
the freedom to configure your drive in a way that best suits your intended
use.  You can find examples of disk configurations in /etc.


Christopher Penrose
jesus!penrose

beaucham@uxh.cso.uiuc.edu (12/19/90)

In response to article 72100017, I have received several replies.  Here is
a summary:

>1) What is the '/clients' directory system supposed to be used for?

	This is apparently used to mount NFS remote (e.g., diskless) 
	workstations.  However, I probably won't need this any time soon,
	perhaps never.  Respondents suggest I rename it and use it for
	something else.  One person suggested reformating to a different
	set of partitions, but unfortunately BuildDisk on 1.0a doesn't
	allow for this.  Noone suggested an alternative.

>2) How do you install a user area other than right under root?
>3) Why don't new users have their names listed in /etc/passwd?

	These questions are related, it turns out.  It turns out, you're 
	supposed to use the NetInfo data base instead of /etc/passwd to 
	install user accounts.  Even though it is present, passwd is ignored.
	Here was one suggestion:

		edit the /etc/passwd file:
		# nidump passwd . > /etc/passwd

		update the /etc/passwd file:
		# vi /etc/passwd

		upload the database:
		# niload passwd . < /etc/passwd

	However, we found that if we first switched to Unix (using the
	Terminal application) and created a subdirectory (e.g., /users)
	and then the specific user subdirectory (e.g., /users/joe),
	using UserManager with the 'long view' set would allow us to
	actually install the user in the desired subdirectory.  The
	passwd file is not affected, but who needs it if it is not used
	anyway?

Jim Beauchamp

eps@toaster.SFSU.EDU (Eric P. Scott) (12/19/90)

In article <15005@sdcc6.ucsd.edu> cpenrose@sdcc13.ucsd.edu
	(Christopher Penrose) writes:
>In article <72100017@uxh.cso.uiuc.edu> beaucham@uxh.cso.uiuc.edu writes:
>>In summary, my questions are:
>>
>>1) What is the '/clients' directory system supposed to be used for?

The /clients directory is used to hold /private file systems for
netbooted clients (such as 105MB NeXTstations whose entire local
storage constitutes "a reasonable amount for swap space").
(No smiley here.)  The separate partition is due to the the NFS
restriction on exporting subdirectories of exported filesystems
(in this case /).

See the man page for newclient(8).

BTW, you can format a 660 as a single partition if you don't need
/clients/.  You get a little more space, but it takes longer to
run fsck after a crash (rare) or power failure (surprise!).
This is getting into generic UNIX system management issues, so
further discussion on this is best taken to an another forum.

>>2) How do you install a user area other than right under root?

Edit /etc/nu.cf
On NeXTs it's considered conventional to create home directories
under /Users/.

>>3) Why don't new users have their names listed in /etc/passwd?

>You have discovered the liabilities of NetInfo, or Network Information
>database.  New users are added directly to a database and are not
>automatically updated in /etc.  I hope this is "corrected" or made an
>option in 2.0.  

This is not "corrected" because it is not a liability.
Just because you haven't seen something before doesn't make it
"wrong."*

(1) There is more information in the NetInfo database
than can be expressed in the "traditional UNIX file formats"
(2) That notwithstanding, you are trying to do something
analogous to displaying a 3-dimensional object on a flat piece
of paper.  It's just not possible--all you can manage are
projections.

If anything, 2.0 is MORE dependent on NetInfo than previous
releases.

We don't even try to maintain the traditional files--they're just
not that useful.

*I'm constantly amazed at the ignorance and closemindedness about
the NeXT, Mach, NetInfo, NextStep, PostScript, etc. I see on
comp.sys.next -- much of it from people who've
(a) never used the machine
(b) never SEEN the machine
(c) never used UNIX
(d) never used a computer that wasn't a PC or a Macintoy
who are absolutely convinced that the NeXT is painted black, and
must be evil, and that it's their divine mission to go around
telling everyone that they're the first in the world to notice
this, and it can't possibly succeed, and the world will end
Real Soon Now because of it.  Like, get a life, ok?

					-=EPS=-

cnh5730@calvin.tamu.edu (Chuck Herrick) (12/20/90)

In article <1058@toaster.SFSU.EDU> eps@cs.SFSU.EDU (Eric P. Scott) writes:
>Edit /etc/nu.cf
>On NeXTs it's considered conventional to create home directories
>under /Users/.

Actually, it's /user/

But does this mean that if you edit nu.cf such that:

WantSymbolicLinks = 1
SymbolicLinkDir="/whatever"

it will follow that from then on new users will end up under /whatever?
pretty slick! And what if you have not first created /whatever?

Actually, you should be able to add your users under /whatever using
UserManager.. you need to click on the long view (it has changed
location in 2.0) and you can specify /whatever as the directory
under which the new user goes. I am of the understanding that you 
can now alter the group of already-installed users from inside
UserManager now (no more niload blah..blah)
-- 
_-_-_-_-_
-_-_-_-_-Chuck Herrick <cnh5730@calvin.tamu.edu>
  The opinions expressed herein are mine and are in no way attributed
  to any of the many people for whom I work. Who they are is irrelevant.

garnett@cs.utexas.edu (John William Garnett) (12/20/90)

In article <10978@helios.TAMU.EDU> cnh5730@calvin.tamu.edu (Chuck Herrick) writes:
>In article <1058@toaster.SFSU.EDU> eps@cs.SFSU.EDU (Eric P. Scott) writes:
>>Edit /etc/nu.cf
>>On NeXTs it's considered conventional to create home directories
>>under /Users/.
>
>Actually, it's /user/
>
>But does this mean that if you edit nu.cf such that:
>
>WantSymbolicLinks = 1
>SymbolicLinkDir="/whatever"
>
>it will follow that from then on new users will end up under /whatever?
>pretty slick! And what if you have not first created /whatever?

If the /whatever directory does not exist, then the NewUser (nu) application
does NOT add anything to the /whatever directory.  If WantSymbolicLinks = 1
and SymbolicLinkDir = /whatever and the /whatever directory does exist,
then the NewUsers application will create a file in the /whatever directory
which will be a symbolic link to the user's actual home directory.

The user's actual home directory defaults to /${USERNAME}.  By changing
"DefaultHome" or "GroupHome" in /etc/nu.cf, it is possible to cause the
NewUser application to create the user's home directory in some directory
other than /.  See the online manual page for nu for more information
(i.e. type "man nu").

As an example of how all of this works, assume that WantSymbolicLinks = 1,
SymbolicLinkDir="/user", DefaultHome="/u", and the /user and /u directories
exist.  Adding a user named "test" will cause a home directory to be
created named /u/test with a symbolic link to it named /user/test.

The "GroupHome" variable allows the sysadmin to maintain separate user
directories for each group (for example, users in group "other" could go
in /u and users in group "system" could go in /u0).
-- 
John Garnett
                              University of Texas at Austin
garnett@cs.utexas.edu         Department of Computer Science
                              Austin, Texas

rca@cs.brown.edu (Ronald C.F. Antony) (12/20/90)

In article <1058@toaster.SFSU.EDU> eps@cs.SFSU.EDU (Eric P. Scott) writes:
>>>3) Why don't new users have their names listed in /etc/passwd?
>>You have discovered the liabilities of NetInfo, or Network Information
>>database.  New users are added directly to a database and are not
>>automatically updated in /etc.  I hope this is "corrected" or made an
>>option in 2.0.  
>This is not "corrected" because it is not a liability.
>Just because you haven't seen something before doesn't make it
>"wrong."*
>(1) There is more information in the NetInfo database
>than can be expressed in the "traditional UNIX file formats"
>(2) That notwithstanding, you are trying to do something
>analogous to displaying a 3-dimensional object on a flat piece
>of paper.  It's just not possible--all you can manage are
>projections.

To set the record straight here:
Although I like the Netinfo concept, as long as NeXT wants to be
BSD4.3 compatible (and I want them to be) there are Unix programs that
rely either on function calls that NeXT did not change to use NI or
that use the flat files driectly. One such example is tcsh. After I
upgraded to 2.0 ~ suddenly did't work anymore. ~username gave me the
error "unknown user: username" etc. 
After a while I finally figured out that tcsh was not broken but my
/etc/passwd was replaced by the upgrade process and tcsh obviously
depends on it for file name completion. So either there is some
funcall screwed or then NeXT should update the flat files even if they
don't use them. 

Ronald
------------------------------------------------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one persists
in trying to adapt the world to himself. Therefore all progress depends on the
unreasonable man."   G.B. Shaw   |  rca@cs.brown.edu or antony@browncog.bitnet

rca@cs.brown.edu (Ronald C.F. Antony) (12/20/90)

In article <10978@helios.TAMU.EDU> cnh5730@calvin.tamu.edu (Chuck Herrick) writes:
>In article <1058@toaster.SFSU.EDU> eps@cs.SFSU.EDU (Eric P. Scott) writes:
>>Edit /etc/nu.cf
>>On NeXTs it's considered conventional to create home directories
>>under /Users/.
>
>Actually, it's /user/

Nope. Quote from the new Network and System Administration manual
(p41):
begin quote===
Home Directory:
The home directory for a new user is set to "/" in the long form. Each
account should have its own individual home directory; because of
this, it's a good idea to change this field. The default is /user,
where user is *replaced* (emphasis added) by the account name of this
account, but a more general solution is to put users in /Users/user.
...
end quote===

Actually the manual is slighly missleading as it would be clearer if
they had used username instead of user. Nevertheless the conventional
thing is /Users/username as the path for homedirectories. Having them
in the root directory is a mess in any case.

Ronald
------------------------------------------------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one persists
in trying to adapt the world to himself. Therefore all progress depends on the
unreasonable man."   G.B. Shaw   |  rca@cs.brown.edu or antony@browncog.bitnet

keen@ee.ualberta.ca (Jeffrey Keen) (12/20/90)

John Garnett writes:
>If the /whatever directory does not exist, then the NewUser (nu) application
>does NOT add anything to the /whatever directory.  If WantSymbolicLinks = 1
>and SymbolicLinkDir = /whatever and the /whatever directory does exist,
>then the NewUsers application will create a file in the /whatever directory
>which will be a symbolic link to the user's actual home directory.
>
>The user's actual home directory defaults to /${USERNAME}.  By changing
>"DefaultHome" or "GroupHome" in /etc/nu.cf, it is possible to cause the
>NewUser application to create the user's home directory in some directory
>other than /.  See the online manual page for nu for more information
>(i.e. type "man nu").
>
>As an example of how all of this works, assume that WantSymbolicLinks = 1,
>SymbolicLinkDir="/user", DefaultHome="/u", and the /user and /u directories
>exist.  Adding a user named "test" will cause a home directory to be
>created named /u/test with a symbolic link to it named /user/test.

Excuse me for not knowing, but why would you want to do this.  This 
would make every file access look up the symbolic link off one part
of the hard drive (where the /whatever directory is) then skip across
the hard drive to where the actual directory then get the file.  Wouldn't
it be more effective to store the users files in the actual users directory
instead of under a symbolic link.  Or is the OS smart enough to skip the
symbolic link after the first time and then access the users directory
from the root of the mount?

Just curious.

>-- 
>John Garnett
>                              University of Texas at Austin
>garnett@cs.utexas.edu         Department of Computer Science
>                              Austin, Texas

Please excuse any typo's , vi at 1200 isn't fun.

eps@toaster.SFSU.EDU (Eric P. Scott) (12/20/90)

In article <72100018@uxh.cso.uiuc.edu> beaucham@uxh.cso.uiuc.edu writes:
>	Here was one suggestion:
>
>		edit the /etc/passwd file:
>		# nidump passwd . > /etc/passwd

Which does NOT work in the general case (only for standalone
workstations), and does not export ALL of the information in the
database because there is no way of representing it in
/etc/passwd format.  niload is something you do ONCE to migrate
non-NeXT users to NeXT, but changes should be done with
NetInfoManager (or niutil if you have to do it from a command
line).

					-=EPS=-

eps@toaster.SFSU.EDU (Eric P. Scott) (12/20/90)

In article <72100018@uxh.cso.uiuc.edu> beaucham@uxh.cso.uiuc.edu writes:
>	                 One person suggested reformating to a different
>	set of partitions, but unfortunately BuildDisk on 1.0a doesn't
>	allow for this.  Noone suggested an alternative.

builddisk--yes, there are two "Build Disk" thingies.  The GUI one
doesn't provide many options because it's targeted at the mindless
users (the ones that cost us our Black Hole, grr).  The command-
line version is much more flexible.

					-=EPS=-

jacob@gore.com (Jacob Gore) (12/23/90)

/ comp.sys.next / eps@toaster.SFSU.EDU (Eric P. Scott) / Dec 19, 1990 /
> In article <15005@sdcc6.ucsd.edu> cpenrose@sdcc13.ucsd.edu
>	(Christopher Penrose) writes:
> [...]
> >>3) Why don't new users have their names listed in /etc/passwd?
>
> >You have discovered the liabilities of NetInfo, or Network Information
> >database.  New users are added directly to a database and are not
> >automatically updated in /etc.  [...]
>
> [...] it is not a liability.
> Just because you haven't seen something before doesn't make it
> "wrong."*
>
> (1) There is more information in the NetInfo database
> than can be expressed in the "traditional UNIX file formats"
> (2) That notwithstanding, you are trying to do something
> analogous to displaying a 3-dimensional object on a flat piece
> of paper.  It's just not possible--all you can manage are
> projections.

Of course Netinfo has more functionality than corresponding /etc/* files.
But there need not be incompatibility: the /etc/* files could be
implemented as special files, interfaces to netinfo.  The "projection" is
all people ask for in these cases.

Jacob
--
Jacob Gore		Jacob@Gore.Com			boulder!gore!jacob