Monday, December 31, 2012

Solaris

Solaris System Admin
User names must:
Be unique within your organization, which might span multiple domains
Contain from two to eight letters and numerals (the first character must be a letter
and at least one character must be a lowercase letter)
 Not contain an underscore or space

If you create
user accounts for a single individual on a number of different systems, always use
the same user name and user ID. In that way, the user can easily move files between
systems without ownership problems.

Although UID numbers 0 through 99 are reserved, you can add a user with one of
these numbers. However, do not use them for regular user accounts. By definition,
root always has UID 0, daemon has UID 1, and pseudo-user bin has UID 2.
To minimize security risks, you should avoid reusing the UIDs from deleted
accounts. If you must reuse a UID, 搘ipe the slate clean?so the new user is not
affected by attributes set for a former user. For example, a former user might have
been denied access to a printer梑y being included in a printer deny list梑ut that
attribute might not be appropriate for the new user.

Each user account should be assigned a password, which is a
combination of six to eight letters, numbers, or special characters.

A home directory can be located either on the user抯 local system or on a remote file
server. In either case, by convention the home directory should be created as
/export/home/username. For a large site, you should store home directories on a
server. Use a separate file system for each /export/homen directory to facilitate
backing up and restoring home directories (for example, /export/home1,
/export/home2).

The two types of groups that a user can belong to are:
 Primary group ?Specifies a group that the operating system assigns to files
created by the user. Each user must belong to a primary group.
 Secondary groups ?Specifies one or more groups to which a user also belongs.
Users can belong to up to 16 secondary groups.

The groups command lists the groups that a user belongs to. A user can have only
one primary group at a time. However, the user can temporarily change the user抯
primary group (with the newgrp command) to any other group in which the user is
a member.

When adding a user account, you must assign a primary group for a user or accept
the default: staff (group 10). The primary group should already exist (if it doesn抰
exist, specify the group by a GID number).

The fields in the passwd file are separated by colons and contain the following
information:
username:password:uid:gid:comment:home-directory:login-shell

link_speed
dmesg |grep Link 能看出当前网卡是以何种速率起来的

或者是用 ndd /dev/hme link_speed 看
1代表100M,而要是0就代表10M.

用ndd -set /dev/hme link_speed 0 强制100M网卡以10M运行

NFS
The NFS configuration(Solaris5.8 as a NFS Client, Redhat Linux9 as a NFS
Server) has been finished. The command of cp, mv, rm, mkdir has been tested
successfully. The configuration procedures are as follows:

1.Start the nfs service of Solaris:
/etc/rc2.d/S73nfs.client start
2.Edit the file "/etc/exports" of RHLinux9, the file content should be like:
/usr     10.10.10.13(rw,all_squash,anonuid=0,anongid=0)
/home/sharedata    10.10.10.13(rw,no_root_squash,anonuid=1012,anongid=10)
3.Restart the nfs service of RHLinux9 to enable your config:
/etc/rc.d/init.d/nfs restart
4.Log on as user dm4admin, create a new directory "test" under
"/export/home1" of Solaris:
mkdir /export/home1/test
5.Mount the desired device on Solaris:
mount -f nfs 10.10.10.14:/usr /export/home1/test
mount -f nfs 10.10.10.5:/home/dm4admin/sharedata /export/home1/dm4admin/documentum

Now you have mapped the directory "10.10.10.14:/usr" on RHLinux9 onto the
directory "/export/home1/test" on Solaris, you can treat the directory
"/export/home1/test" as your local device on Solaris. All your action on the
directory will work on  the directory "10.10.10.14:/usr" on RHLinux9.

mount -f nfs 10.10.10.5:/home/sharedata /export/home1/dm4admin/documentum/sharedata
umount -f /export/home1/dm4admin/documentum
cp documentum_setup/* documentum
cp -r documentum_setup/product documentum
chown -R dm4admin:topic documentum


umount /export/home1/dm4admin/documentum
PrintersRemoteSecurity
umount -f /export/home1/dm4admin/documentum
libldapssl30.so
R426DEV
/etc/rc.d/init.d/nfs restart
loadscript_08272004_R426DEV_fulldocbase_action.api



groupmod -g 237 wheel
groupadd -g 10 topic
useradd -u 1012 -g topic -d /home/dm4admin dm4admin
passwd dm4admin             dm4admin

useradd -u 1009 -g topic -d /home/r426dev r426dev
mount -f nfs 10.10.10.5:/home/dm4admin/sharedata /export/home1/dm4admin/documentum

cp -r -p /export/home1/dm4admin/documentum_init/* /export/home1/dm4admin/documentum

mount -f nfs 10.10.10.5:/home/homeOfSolaris /export/bckOnLinux

Other
Issues about Solaris:
1.need to add path /usr/j2se/bin to profile.for example:
PATH=/usr/j2se/bin:$DM_HOME/bin:$DOCUMENTUM/dba:/usr/openwin/bin:$PATH
export PATH

2.tar and gzip can't work,it indicats Command not found.
Download tar and gzip package and install them by typing:
pkgadd -d tar-1.14-sol8-sparc-local
pkgadd -d gzip-1.3.3
if it shows such message
"Current administration requires that a unique instance of the
<SMCgzip> package be created.  However, the maximum number of
instances of the package which may be supported at one time on the
same system has already been met.

No changes were made to the system."
You need uninstall the package by:
rm -r /var/sadm/pkg/SMCgzip
Then run:
pkgadd -d gzip-1.3.3

3.When using XManager to access Solaris to run GUI,it may show some message about set DISPLAY,
you need to
DISPLAY=10.10.10.190:0.0
export DISPLAY

4.root user execute the command after -c as username
su - username -c -command

5.For the pop page of register,just click the right button and select never register.
if you want to register,run:
/usr/dt/bin/solregis
提示: 当启动桌面时, 那个注册提醒器能用”more information”中的“never register”选项禁止. 
要禁止所有用户中出现的的警告信息, 在/etc/default/solregis文件中加入一行ISABLE=1

6.用什么命令能解开*.tar.Z的压缩包??
今天下午在SUN上试过了,zcat根本不行。
还是
先用命令: uncompress *.tar.Z ,然后文件名就会变成 *.tar
然后再用: tar -xvf *.tar 成功了。

7.使用nohup命令
如果你想进程在你退出系统后还能执行,可以使用NOHUP命令
如: % nohup tar -cf /dev/tape /home &
你退出后再重新登录的话,使用'ps'命令可以看到进程还在执行

8.启动问题?
开机后显示:
Boot device: devalias File and args:
Can't open boot device
Type help for more information
ok
无法进入CDE界面,上述是何意思,如何解决?
执行reset-all
当屏幕出现initial memory的信息时,按stop+A
然后probe-scsi-all,查看硬盘是否能够正常认出,若不能,基本上可确认是硬盘损坏
若可以,执行boot disk
若硬盘不是彻底损坏的话,会启动到单用户模式,提示你用fsck进行修复。
为省事起见,可以执行fsck -y
执行完毕之后,exit,继续启动至正常状态

9.有关DISPLAY变量
不用使用rlogin的;
你是从PC机上先连A机,再连B机,对吗?
pc-> A机,如果是以root身份登录,登录以后,
echo | grep DIS
会发现DISPLAY=xx:0.0,这个xx是PC机的IP地址,也就是说,A机调用的是PC的X。
然后执行: xhost +
再从A机上telnet B机,也是以root身份登录的话,登录以后,再echo | grep DIS
你会发现DISPLAY仍然是PC的IP地址,也就是说,A机执行xhost +之后,B机就能通过A机拿到PC机的X。
当然了,若是以普通用户登录的话,就没法自动获取这个图形终端了,这时,你就得手工输入:
DISPLAY=xx:0.0;export DISPLAY(这儿的xx应该指的是PC机的IP地址),来获得X

10.如何在unix下抓屏幕
snapshot

11.裝好solaris8如何知道是否有裝c compiler
操作系统不带c compiler
c需要用钱买,用gcc,效果一样
gcc要去哪里找
www.sunfreeware.com 

12.在Solaris 8(Sparc)中的CDE登录画面上,能切换到字符界面吗?
option->command 
但不支持多个字符console

13.文件编辑: 不喜欢vi的人可用CDE的编辑器dtpad.

14.当无法显示图形界面时,如何解决?
运行Xhost  +  主机名。
设置环境变量DISPLAY,DISPLAY=:0.0; export  DISPAY

UNIX essentials Featuring the Solaris 10 Operating System
1. cal 12 2004;date
2. man
h: provides a description of all scrolling capabilities
man -l passwd
man -s 4 passwd
man -k calendar
3. ls -ld dir1
view the detailed information about a directory without viewing its contents.
ls -R dir1
4. wc test.ksh
   647    2223   28602 test.ksh            --lines -l, words -w, characters -m
5. echo $SHELL
6.
find /etc -type f -exec grep PASSREQ {} \; -print 2>/dev/null
7.
view ~/.profile
view ~/.kshrc
8. grep -n root /etc/group            -n view their line numbers
grep -v root /etc/group               -v do not contain root

No comments:

Post a Comment