Solaris 10 – lofiadm
ISO images contents can be access by mounting the image directly into the filesystem using the lofiadm and mount commands rather than burning the image to a DVDROM or CDROM.
Given an ISO image in /export/temp/software.iso, a loopback file device (/dev/lofi/1) is created with the following command:
lofiadm -a /export/temp/software.iso /dev/lofi/1
The lofi device creates a block device version of a file. This block device can be mounted to /mnt with the following command:
mount -F hsfs -o ro /dev/lofi/1 /mnt
These commands can be combined into a single command:
mount -F hsfs -o ro `lofiadm -a /export/temp/software.iso` /mnt
Categories: Solaris Tags:
Solaris – Adding User and Home Directory
To create a user newuser with shell /usr/bin/bash and home directory /export/home/user:
# mkdir /export/home/user
# useradd -s /usr/bin/bash -d /export/home/newuser newuser
# chown newuser:staff /export/home/newuser
# passwd newuser
New Password:
Re-enter new Password:
passwd: password successfully changed for newuser
To create a role with roleadd. The usermod and rolemod commands modify the properties of users and roles, respectively:
# usermod -s /usr/bin/csh newuser
userdel and roledel delete users and roles.
groupadd, groupmod, and groupdel manage groups.
Categories: Solaris Tags:
Solaris Commands
Search a package
# pkg search -r openoffice
Installing a package
# pkg install openoffice
Uninstalling a package
# pkg uninstall openoffice
Hrdware details
# prtconf
Processor Information:
# psrinfo -pv
List all processes
# ps -ef
View the services
# svcs
View the system-log
# svcs system-log
Enable a service
# svcadm enable network/ftp
Categories: Solaris Tags: