Adding a user in Solaris:
Changing the defaults settings in this file:
/usr/sadm/defadduser
defgroup=1
defgname=other
defparent=/home
defskel=/etc/skel
defshell=/bin/bash
definact=0
defexpire=
defauthorization=
defprofile=
defproj=3
defprojname=
defrole=
I searched hi & lo for this file. I could not find it documented any where, so here it is.
Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts
22 Jun 2011
11 Sept 2009
NRPE failed ssl handshake
Can't get nrpe to work but config looks ok.
My remote host is behind a firewall and IP address is nated.
Run dmesg | tail
Get this message (Lots of them):
Add IP address in nrpe.cfg file:
My remote host is behind a firewall and IP address is nated.
Run dmesg | tail
Get this message (Lots of them):
Sep 11 14:32:56 host nrpe[3321]: [ID 381997 daemon.error] Host 196.4.165.245 is not allowed to talk to us!
Add IP address in nrpe.cfg file:
allowed_hosts=127.0.0.1,xxx.xxx.xxx.xxx,196.4.165.245
and restart nrpe daemon.01 Jun 2009
scan for new harware at boot time.
To scan for new hardware, reboot as such
reboot -- rv
reboot -- rv
13 May 2009
Port number to PID
Print out all the PIDs and associated ports.
ps -ef | awk '!/PID/{print $2}' | xargs pfiles 2>/dev/null | awk -F":" '$1~/^[0-9]/{XPID=$1;XCMD=$2};
/port/{print XPID, " ", XCMD, " : \n\t",$0}'
ps -ef | awk '!/PID/{print $2}' | xargs pfiles 2>/dev/null | awk -F":" '$1~/^[0-9]/{XPID=$1;XCMD=$2};
/port/{print XPID, " ", XCMD, " : \n\t",$0}'
04 May 2009
Zones: Change IP address
To change an IP address of an zone.
zonecfg:z> select net address=[old IP]
zonecfg:z:net> set address=[new IP]
zonecfg:z:net> end
zonecfg:z> commit
Reference: Sun Forums
zonecfg:z> select net address=[old IP]
zonecfg:z:net> set address=[new IP]
zonecfg:z:net> end
zonecfg:z> commit
Reference: Sun Forums
19 Mar 2009
HBAs
Querry HBAs.
fcinfo hba-port
fcinfo hba-port -l
fcinfo remote-port -slp WWN
luxadm -e port
fcinfo hba-port
fcinfo hba-port -l
fcinfo remote-port -slp WWN
luxadm -e port
26 Feb 2009
24 Jun 2008
DVD burnining
/opt/schily/bin/cdrecord dev=1,0,0 driveropts=help -checkdrive
Cdrecord-ProDVD-ProBD-Clone 2.01.01a35 (i386-pc-solaris2.10) Copyright (C) 1995-2007 Jörg Schilling
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Warning: Using USCSI interface.
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'MATSHITA'
Identifikation : 'DVD-RAM UJ-822S '
Revision : '1.61'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
/opt/schily/bin/cdrecord: Cannot load media with this drive!
/opt/schily/bin/cdrecord: Try to load media by hand.
Driver options:
burnfree Prepare writer to use BURN-Free technology
noburnfree Disable using BURN-Free technology
# /opt/schily/bin/cdrecord driveropts=burnfree dev=1,0,0 SUSE11x64.iso
/opt/schily/bin/cdrecord: No write mode specified.
/opt/schily/bin/cdrecord: Asuming -sao mode.
/opt/schily/bin/cdrecord: If your drive does not accept -sao, try -tao.
/opt/schily/bin/cdrecord: Future versions of cdrecord may have different drive dependent defaults.
Cdrecord-ProDVD-ProBD-Clone 2.01.01a35 (i386-pc-solaris2.10) Copyright (C) 1995-2007 Jörg Schilling
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Warning: Using USCSI interface.
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'MATSHITA'
Identifikation : 'DVD-RAM UJ-822S '
Revision : '1.61'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
Using generic SCSI-3/mmc-2 DVD-R/DVD-RW/DVD-RAM driver (mmc_dvd).
Driver flags : NO-CD DVD MMC-3 SWABAUDIO BURNFREE
Supported modes: PACKET SAO
WARNING: Phys disk size 1 differs from rzone size 2298496! Prerecorded disk?
WARNING: Phys start: 196608 Phys end 196608
Starting to write CD/DVD/BD at speed 2 in real SAO mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Track 01: Total bytes read/written: 4651712512/4651712512 (2271344 sectors).
Cdrecord-ProDVD-ProBD-Clone 2.01.01a35 (i386-pc-solaris2.10) Copyright (C) 1995-2007 Jörg Schilling
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Warning: Using USCSI interface.
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'MATSHITA'
Identifikation : 'DVD-RAM UJ-822S '
Revision : '1.61'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
/opt/schily/bin/cdrecord: Cannot load media with this drive!
/opt/schily/bin/cdrecord: Try to load media by hand.
Driver options:
burnfree Prepare writer to use BURN-Free technology
noburnfree Disable using BURN-Free technology
# /opt/schily/bin/cdrecord driveropts=burnfree dev=1,0,0 SUSE11x64.iso
/opt/schily/bin/cdrecord: No write mode specified.
/opt/schily/bin/cdrecord: Asuming -sao mode.
/opt/schily/bin/cdrecord: If your drive does not accept -sao, try -tao.
/opt/schily/bin/cdrecord: Future versions of cdrecord may have different drive dependent defaults.
Cdrecord-ProDVD-ProBD-Clone 2.01.01a35 (i386-pc-solaris2.10) Copyright (C) 1995-2007 Jörg Schilling
scsidev: '1,0,0'
scsibus: 1 target: 0 lun: 0
Warning: Using USCSI interface.
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'MATSHITA'
Identifikation : 'DVD-RAM UJ-822S '
Revision : '1.61'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
Using generic SCSI-3/mmc-2 DVD-R/DVD-RW/DVD-RAM driver (mmc_dvd).
Driver flags : NO-CD DVD MMC-3 SWABAUDIO BURNFREE
Supported modes: PACKET SAO
WARNING: Phys disk size 1 differs from rzone size 2298496! Prerecorded disk?
WARNING: Phys start: 196608 Phys end 196608
Starting to write CD/DVD/BD at speed 2 in real SAO mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Track 01: Total bytes read/written: 4651712512/4651712512 (2271344 sectors).
19 Jun 2008
Dhcp & unknwon host
To fix the problem with unknown host using dhcp in Solaris 10, you need to edit 2 files:
1.) /etc/nodename. Add hostname to this file.
2.) /etc/default/dhcpagent. Edit this file and set this option: REQUEST_HOSTNAME=no
reboot and viola!
1.) /etc/nodename. Add hostname to this file.
2.) /etc/default/dhcpagent. Edit this file and set this option: REQUEST_HOSTNAME=no
reboot and viola!
12 Jun 2008
Proccess commands
- pflags: Prints the tracing flags, pending and held signals and other
/proc
status information for each LWP. - pcred: Prints credentials (ie, EUID/EGID, RUID/EGID, saved UID/GIDs).
- pmap: Prints process address space map.
- pldd: Lists dynamic libraries linked to the process.
- psig: Lists signal actions.
- pstack: Prints a stack trace for each LWP in the process.
- pfiles: Reports
fstat
,fcntl
information for all open files. - pwdx: Prints each process's working directory.
- pstop: Stops process.
- prun: Starts stopped process.
- pwait: Wait for specified processes to terminate.
- ptree: Prints process tree for process.
- ptime: Times the command using microstate accounting; does not time children.
Refering site.
15 Apr 2008
12 Nov 2007
VIM: Slow to startup
Vim takes a long time to start.
Check your $DISPLAY variable is pointing to a valid X-Host.
Check your $DISPLAY variable is pointing to a valid X-Host.
08 Oct 2007
smbclient 2 Windows 2003 server. Quicky
1.) Update smb.conf file: Global section.
# Global parameters
[global]
workgroup = DOMAIN-NT
security = DOMAIN
server string = Samba %v on %h - Wacky
max log size = 65536
preferred master = No
local master = No
domain master = No
wins server = 192.167.0.4, 192.168.0.6
password server = 192.168.0.4, 192.168.0.6
idmap uid = 20000-29999
idmap gid = 20000-29999
template homedir = /dev/null
winbind enum users = Yes
winbind enum groups = Yes
restrict anonymous = 2
syslog = 1
;client schannel = no
;winbind use default domain = Yes
msdfs proxy = no
2.) Join the domain.
/usr/local/samba/bin/net RPC join -U username
And then
/usr/local/samba/bin/net rpc testjoin
3.) Connect.
smbclient //server/share -U username%password -W DOMAIN-NT
Domain=[DOMAIN-NT] OS=[Windows Server 2003 3790] Server=[Windows Server 2003 5.2]
smb: \>
Done.
# Global parameters
[global]
workgroup = DOMAIN-NT
security = DOMAIN
server string = Samba %v on %h - Wacky
max log size = 65536
preferred master = No
local master = No
domain master = No
wins server = 192.167.0.4, 192.168.0.6
password server = 192.168.0.4, 192.168.0.6
idmap uid = 20000-29999
idmap gid = 20000-29999
template homedir = /dev/null
winbind enum users = Yes
winbind enum groups = Yes
restrict anonymous = 2
syslog = 1
;client schannel = no
;winbind use default domain = Yes
msdfs proxy = no
2.) Join the domain.
/usr/local/samba/bin/net RPC join -U username
And then
/usr/local/samba/bin/net rpc testjoin
3.) Connect.
smbclient //server/share -U username%password -W DOMAIN-NT
Domain=[DOMAIN-NT] OS=[Windows Server 2003 3790] Server=[Windows Server 2003 5.2]
smb: \>
Done.
20 Jul 2007
Mount an ISO image
lofiadm -a /export/temp/software.iso /dev/lofi/1
mount -F hsfs -o ro /dev/lofi/1 /mnt
mount -F hsfs -o ro `lofiadm -a /export/temp/software.iso` /mnt
Source: http://www.tech-recipes.com/solaris_system_administration_tips218.html
mount -F hsfs -o ro /dev/lofi/1 /mnt
mount -F hsfs -o ro `lofiadm -a /export/temp/software.iso` /mnt
mount -F hsfs -o ro `lofiadm -a /export/temp/software.iso` /mnt
Source: http://www.tech-recipes.com/solaris_system_administration_tips218.html
10 Jul 2007
Cron log: Bad user
This happend on Solaris 10 when the user account is locked out.
Change the entry in the shadow file from LK to NP
Change the entry in the shadow file from LK to NP
30 Apr 2007
Performance Tuning
iostat -xnc 10
I/O-Bound System
cpu
us sy wt id
25 12 14 49
extended device statistics
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.3 0.9 3.2 7.9 0.0 0.0 6.0 16.6 1 1 d1
16.3 102.6 3011.8 960.0 0.5 1.0 4.3 8.3 0 48 c4t600C0FF000d0
I/O-Bound System
Field Value sar Option
%busy (% time disk is busy) >85 sar -d
%rcache (reads in buffer cache) low, <85>30 sar -u
fileserver >80
Excessive Swapping/Paging
bswot/s (ransfers from memory to disk swap area) >200 sar -w
bswin/s (transfers to memory) >200 sar -w
%swpocc (time swap queue is occupied) >10 sar -q
rflt/s (page reference fault) >0 sar -t
freemem (average pages for user processes) <100>2 sar -q
%runocc (% run queue occupied and processes not executing) >90 sar -q
Good reference site.
07 Nov 2006
Can't mount/eject cdrom
The CD is in the drive. You can't see it. you can't mount it, you can't eject it.
Restart vold. Kill -9 does a good job.
Start vold with /etc/init.d/volmgt start
Restart vold. Kill -9 does a good job.
Start vold with /etc/init.d/volmgt start
Subscribe to:
Posts (Atom)