Start the
daemon.
Normally the system administrator, logged in as root, enters this command
at system startup:
$ cifsclient start
CIFS Client started; process id: 12783
To check status at any time:
$ cifsclient status
path: /opt/cifsclient/sbin/cifsclientd
version: FILESET
HP CIFS CLIENT: Version: A.01.09
Compiled
on HP-UX B.11.00, s785/C360,
03/05/30, 13:34:15
cifsclientd: ver_id=1291218999
cksum: 2781544263
status: CIFS
Client is up; process id 12783, started
Apr 13
mntck: ok
You can also configure your system to start the CIFS Client automatically
at bootup by editing the file /etc/rc.config.d/cifsclient such
that the run flag is set to 1: RUN_CIFSCLIENT=1.
There must be no spaces on either side of the equal sign.
Mount and unmount shares on a CIFS server.
This must be done by root. Directories
mounted by the HP CIFS Client must first be configured as shares on
the HP CIFS Server.
In this example, the share source, configured
as a share on the HP CIFS Server, is mounted by the CIFS Client
using the directory /home/devl/source as the
mount point. The directory used as the mount point must already
exist.
To mount:
$ mount -F cifs buildsys:/source
/home/devl/source
To unmount:
$ umount /home/devl/source
Access the shared directory via the mount point
on the Client.
The HP CIFS Client allows access to mounted directories only
on a per-user basis. Therefore, each user must first be authenticated
by the HP CIFS Server. This is accomplished through the cifslogin command.
In this example, the share source has
been mounted by the system administrator. The root user
on the Client wants to access the shared directory on buildsys.
This is first attempted by changing directories to the mount point,
but without first logging into the server (this fails).
Then, by logging into buildsys with the cifslogin command, the user is authenticated
by buildsys and can access its shared source directory
through the CIFS Client’s mount point. Note that the user name
used to login to the CIFS Server can be different than the current
login name at the Client. The account and password pair used in cifslogin must
exist on the system that does the authentication.
Further, if the CIFS Server is a HP-UX system, all users
on the Client that access the Server should have the same uid on
both systems, so that file ownership is consistent.
$ whoami
root
cd
/home/dev1/source
sh: /home/dev1/source: not found
This fails because the user has not yet logged into the CIFS
Server buildsys.
$cifslogin buildsys root
Remote
user root’s password: *****
This succeeds. To verify the results:
$ cifslist
===========================================================
Server
buildsys:
===========================================================
Remote
Username: root Local
Username: root
Share: \\BUILDSYS\source
rw
/home/dev1/source
$ cd /home/dev1/source
$
_
Normal users (non-root) gain access to
CIFS mounts in the same manner. Using the example above (source is
mounted and root is authenticated on buildsys),
a user named lucy accesses the mount as follows:
$ cifslogin buildsys lucy
Remote
user lucy’s password: *****
Verify results:
$ cifslist
===========================================================
server
buildsys:
===========================================================
Remote
Username: root Local
Username: root
Remote Username: lucy Local
Username: lucyShare: \\BUILDSYS\source
rw
/home/devl/source