OpenAFS on Solaris 9 x86 - Installing - Create User
Following the installation instructions at
http://www.openafs.org/pages/doc/QuickStartUnix/auqbg005.htm#HDRWQ45
uncovered some problems with Solaris 9x86:
Creating and mounting the AFS filesystem
This is the initial filesystem after a fresh install of Sol9x86:
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0s0 2790247 1725062 1009381 64% /
/dev/dsk/c0d0p0:boot 11234 1581 9653 15% /boot
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
swap 802120 88 802032 1% /var/run
swap 802032 0 802032 0% /tmp
/dev/dsk/c0d0s7 2844249 9 2787356 1% /export/home
/cap 2790247 1725062 1009381 64% /home/cap
I decided to use the previously unused partition /dev/dsk/c0d0s7 as AFS partition,
so I edited vfstab:
# nano -w /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0d0s1 - - swap - no -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0 / ufs 1 no -
/dev/dsk/c0d0p0:boot - /boot pcfs - no -
#/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7 /export/home ufs 2 yes -
/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7 /vicepa afs 2 yes -
swap - /tmp tmpfs - yes -
/sbin/mountall on Sol9 is different than the previous versions of this file, so
I haven't got a solution yet on how to alter that file:
# mountall
/dev/rdsk/c0d0s7 uncorrectable error
mount: /tmp is already mounted, swap is busy,
or the allowable number of mount points has been exceeded
"mountall" fails, but after making an AFS filesystem on that partition
"mount -a" works
Despite the new entry in vfstab, "newfs" creates an UFS filesystem, but we need the
allocations for mkfs later:
# newfs -v /dev/rdsk/c0d0s7
newfs: /dev/rdsk/c0d0s7 last mounted as /export/home
newfs: construct a new file system /dev/rdsk/c0d0s7: (y/n)? y
mkfs -F ufs /dev/rdsk/c0d0s7 5812695 63 15 8192 1024 64 2 60 6144 t 0 -1 8 7 n
Warning: 1 sector(s) in last cylinder unallocated
/dev/rdsk/c0d0s7: 5812694 sectors in 6151 cylinders of 15 tracks, 63 sectors
2838.2MB in 97 cyl groups (64 c/g, 29.53MB/g, 4992 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 60576, 121120, 181664, 242208, 302752, 363296, 423840, 484384, 544928,
5262240, 5322784, 5383328, 5443872, 5504416, 5564960, 5625504, 5686048,
5746592, 5806112,
Use the allocations of "newfs" from the previous step to construct the "mkfs" command:
# mkfs -F afs /dev/rdsk/c0d0s7 5812695 63 15 8192 1024 64 2 60 6144 t 0 -1 8 7 n
Warning: 1 sector(s) in last cylinder unallocated
/dev/rdsk/c0d0s7: 5812694 sectors in 6151 cylinders of 15 tracks, 63 sectors
2838.2MB in 97 cyl groups (64 c/g, 29.53MB/g, 4992 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 60576, 121120, 181664, 242208, 302752, 363296, 423840, 484384, 544928,
5262240, 5322784, 5383328, 5443872, 5504416, 5564960, 5625504, 5686048,
5746592, 5806112,
While booting there is the following message:
/dev/rdsk/c0d0s7 uncorrectable error
but after booting the partition can be mounted with "mount -a" and the AFS-daemon (afsd)
starts fine:
/etc/init.d/afs start
WINDOWS CLIENT
The Windows client of OpenAFS installed just fine, I also was able to obtain a token
and the drive icon appeared in Windows Explorer, but I didn't see files nor did
I have write permission.
I mapped the windows drive to "\afs". With this
mapping you only see the AFS root filesystem which is write-protected.
Solution:
My cell name is "sol" - so I mapped the drive to "\afs\sol" and voila! I saw all directories
and files created previously during working thru the document "Quick Beginnings" on the
OpenAFS website.
CREATE A USER AND HOMEDIRECTORY
Obtain admin previledges:
./klog admin
Create the user: (kas create <username> <password> admin)
./kas create testuser testuser admin
./pts createuser testuser
Create a group if you desire:
./pts creategroup mygroup
Add the user to the group:
./pts adduser testuser mygroup
Create the volume (vos create <machine> <partitionname> <username>)
./vos create sol vicepa testuser
Mount the volume:
./fs mkmount /afs/.sol/testuser testuser
Release the root.cell (issue callback)
./vos release root.cell
Set the quota for the volume
./fs setquota /afs/.sol/testuser 10000
Set the ACL permissions for any users (read,list,insert)
./fs setacl /afs/.sol/testuser system:anyuser rli
Set the ACL permissions for "testuser" (all permissions)
./fs setacl /afs/.sol/testuser testuser all
Add another user:
./kas create test test admin
./pts createuser test
./pts addu test mygroup
Set permissions for "test" in /afs/.sol/testuser (read,write,list,delete,insert)
./fs setacl /afs/.sol/testuser test rwldi
Verify your changes with:
./fs listacl /afs/.sol/testuser
Last-Modified: Sat, 04 Feb 2006 16:13:13 GMT
|