On Sun, Dec 29, 2002 at 07:02:15PM -0800, Jay Schaffer wrote:
>      //NT1/PCVol          /mnt/NT1          smbfs  defaults      0   0
> 

I'm using the following with very good results (ie it works as expected):

//server/share          /home/samp/stuff      smbfs  
username=samp,uid=samp,gid=users,password=sekrit    0 0


The directory is mounted at boot and the files and directories are owned
by my user and group.

Red Hat 7.3 (which is the system that I tried this on) checks the fstab
for nfs and smbfs mounts and automatically will try to mount them on
boot (unless the noauto option is given with the other options.)  The
startup script that does this on my system is /etc/init.d/netfs.

On Red Hat systems you can check if a startup script is going to run on
boot with the chkconfig command.  Example:

[root@hephaestus root]# chkconfig --list netfs
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off


What this output is saying is that in runlevels 3, 4, and 5 the netfs
script will be run with an argument of start, which mounts all of the
nfs, ncpfs (netware shares iirc), and smbfs filesystems that it knows
about from /etc/fstab (see previous about noauto.

In runlevels 0, 1, 2, and 6 the netfs script will be run with an
argument of stop, which will umount all of the filesystem that are from
a remote machine.

So if this says off all the way across then you're going to have big
problems.  To turn on a startup script for a particular runlevel you do

chkconfig --level 345 netfs on


This would turn on netfs for runlevels 3, 4, and 5.

If everything is working well when you boot your system you should see a
message that says

Mounting SMB filesystems:                                  [  OK  ]


==An Aside on Runlevels==

This is pretty Red Hat specific since that's what we're talking about.
On different distros it can be very similar or very very different.

Runlevels are used by unix systems so that after starting the kernel the
machine knows what to run.  There are many different runlevels so that
you can put the machine into several different modes.

The "standard" modes that Red Hat uses are loosely defined as:

0 - halt the machine
1 - single user mode, no network
2 - single user mode, with network
3 - multiuser, console mode
4 - not used
5 - multiuser, X login displayed
6 - reboot

If after the system boots and you get a big colorful GUI with windows
asking you to log in then you're in runlevel 5.  If when you log in and
you get a plain text login then you're in runlevel 3.

Runlevels 1 and 2 are used for administrative stuff like recovering
deleted files, restoring from back up, figuring out how a cracker got
into your system, etc.

Runlevels 0 and 6 are used for cleanly shutting down programs before the
system actually turns itself off or reboots.

This abstraction is cool in embedded systems when you need a normal
operating mode and a maintenance mode.  It's similar to the Windows idea
of a regular mode and a "Safe" mode as well.


-- 
Sam Phillips <[EMAIL PROTECTED]>                http://www.dasbistro.com
Reno                                                              Nevada
_______________________________________________
RLUG mailing list
[EMAIL PROTECTED]
http://www.rlug.org/mailman/listinfo/rlug

Reply via email to