Note = Solaris MICS CMD etc etc
Solaris Common Command Line And
Others Issue |
bash-3.00# useradd -d /export/home/routers -m -s /bin/bash
-c "Routers NOC" routers
Solaris
11 Multi useradd "Scripted" autosh.sh + userlist.txt
#!/bin/ksh
# changeme as default
# Adds users from the userlist.txt file
if they are not in
# /etc/passwd.
#
CURRENTUSERS=`awk -F":" '{ print $1 }'
/etc/passwd`
EXPECTEDUSERS=`cat userlist.txt`
USERFOUND=0
for i in $EXPECTEDUSERS ; do
for x in
$CURRENTUSERS ; do
if [ "$x" = "$i" ] ; then
USERFOUND=1
fi
done
if [ $USERFOUND
-eq 1 ] ; then
echo Found user: $i
USERFOUND=0
else
/usr/sbin/useradd -d /export/home/$i -g staff $i
echo Adding user: $i
sed
s/$i:.*:.*:.*:.*:.*:.*:.*:/$i:XOHWcSkDQKZaA:14208:0:99999:7:::/g
</etc/shadow>/etc/shadow2
cp /etc/shadow2 /etc/shadow
rm /etc/shadow2
fi
done
exit 0
user1
user2
Solaris
Mount .iso / Mount Linux DIsk "rmformat"
bash-3.00# lofiadm -a /export/home/rou/linux.iso
/dev/lofi/3
bash-3.00# mkdir
/mnt/3
bash-3.00# mount -o
ro -F hsfs -o ro /dev/lofi/3 /mnt/3
bash-3.00# mount -F
ext2fs /dev/dsk/c5t0d0p1 /mnt/usb
bash-3.00# echo "LookupClientHostnames no" >>
/etc/ssh/sshd_config
bash-3.00# svcadm
restart ssh
bash-3.00# svcs -a |grep smtp
online
20:23:57 svc:/network/smtp:sendmail
bash-3.00# svcadm
disable svc:/network/smtp:sendmail
bash-3.00# svcs
-a |grep smtp
disabled
13:59:53 svc:/network/smtp:sendmail
Solaris
Ping OK Browser Not Work
root@sol-11:~# route delete default 192.168.1.1
root@sol-11:~# route
add default 192.168.1.11
root@solaris:~# ipadm create-addr -T static -a
103.28.88.121/26 net1
root@solaris:~# route -p add default
103.28.88.65
append -s in kernel line in grub, then
user root just enter empty, change pass with passwd and
reboot
root@sol-11:~# cp libflashplayer.so
/usr/lib/firefox/plugin
root@sol-11:~# chmod
-R 755 /usr/lib/firefox/plugins
login root gui - edit /etc/user_attr ,
root to normal then login as root
root@sol-11:~# /usr/bin/java -DHOME=/root -jar JavaSetup.jar
Solaris
Memory and CPU Checking
root@sol-11:~# /usr/sbin/prtconf | grep Memory
Memory size: 3933 Megabytes
root@sol-11:~# /usr/sbin/psrinfo -v
Status of virtual processor 0 as of: 12/02/2012 21:02:49
on-line since 12/02/2012 09:04:52.
The i386 processor operates at 2001 MHz,
and has an i387 compatible floating point
processor.
Status of virtual processor 1 as of: 12/02/2012 21:02:49
on-line since 12/02/2012 09:04:58.
The i386 processor operates at 2001 MHz,
and has an i387 compatible floating point
processor.
Solaris
Extra Repo / Publisher
root@sol-11:~# pkg set-publisher -p
http://pkg.openindiana.org/sfe
pkg set-publisher:
Added publisher(s): sfe
root@sol-11:~# pkg
set-publisher -p http://pkg.openindiana.org/sfe-encumbered
pkg set-publisher:
Added publisher(s): sfe-encumbered
root@sol-11:~# pkg install vlc
Solaris
From
Text
Install
Desktop
root@sol-11dev:~#
pkg install --accept slim_install
Packages to install: 628
Mediators to change: 1
Create boot
environment: No
Create backup boot environment: No
Services
to change: 17
root@sol-11dev:~# pkg uninstall slim_install
root@sol-11dev:~# svcadm enable
svc:/application/graphical-login/gdm:default
Solaris
11
Boot Menu & Dual boot Linux "menu.lst w/seq Linux 1st
& Solaris 2nd
root@sol-11:~# bootadm list-menu
the location of the boot loader configuration files is: /rpool/boot/grub
title Centos Grub
rootnoverify (hd0,0)
makeactive
chainloader +1
Solaris
11 SSH Failed Login LOG
root@sol-11web:~#
nano -w /etc/default/login >>
SYSLOG_FAILED_LOGINS=0
root@sol-11web:~# touch /var/adm/authlog
root@sol-11web:~# chmod 600
/var/adm/authlog
root@sol-11web:~# chgrp sys
/var/adm/authlog
root@sol-11web:~# nano -w -S
/etc/syslog.conf
auth.notice <Press Tab>
/var/adm/authlog
root@sol-11web:~# svcadm refresh
system/system-log