JavaScript is required to for searching.
跳过导航链接
退出打印视图
手册页第 1M 部分:系统管理命令     Oracle Solaris 11 Information Library (简体中文)
search filter icon
search icon

文档信息

前言

简介

系统管理命令-第 1 单元

系统管理命令-第 2 单元

mail.local(1M)

makedbm(1M)

makemap(1M)

makeuuid(1M)

masfcnv(1M)

mdlogd(1M)

mdmonitord(1M)

mdnsd(1M)

medstat(1M)

metaclear(1M)

metadb(1M)

metadetach(1M)

metadevadm(1M)

metahs(1M)

metaimport(1M)

metainit(1M)

metaoffline(1M)

metaonline(1M)

metaparam(1M)

metarecover(1M)

metarename(1M)

metareplace(1M)

metaset(1M)

metassist(1M)

metastat(1M)

metasync(1M)

metattach(1M)

mib2mof(1M)

mibiisa(1M)

mkbootmedia(1M)

mkdevalloc(1M)

mkdevmaps(1M)

mkfifo(1M)

mkfile(1M)

mkfs(1M)

mkfs_pcfs(1M)

mkfs_udfs(1M)

mkfs_ufs(1M)

mknod(1M)

mkntfs(1M)

mkpwdict(1M)

modinfo(1M)

modload(1M)

modunload(1M)

mofcomp(1M)

mofreg(1M)

monacct(1M)

monitor(1M)

mount(1M)

mountall(1M)

mountd(1M)

mount_hsfs(1M)

mount_nfs(1M)

mount_pcfs(1M)

mount_smbfs(1M)

mount_tmpfs(1M)

mount_udfs(1M)

mount_ufs(1M)

mpathadm(1M)

mpstat(1M)

msgid(1M)

mvdir(1M)

named(1M)

named-checkconf(1M)

named-checkzone(1M)

named-compilezone(1M)

ncaconfd(1M)

ncheck(1M)

ncheck_ufs(1M)

ndd(1M)

ndmpadm(1M)

ndmpd(1M)

ndmpstat(1M)

netadm(1M)

netcfg(1M)

netcfgd(1M)

netservices(1M)

netstat(1M)

netstrategy(1M)

newaliases(1M)

newfs(1M)

newkey(1M)

nfs4cbd(1M)

nfsd(1M)

nfslogd(1M)

nfsmapid(1M)

nfsref(1M)

nfsstat(1M)

nscadm(1M)

nscd(1M)

nscfg(1M)

nslookup(1M)

nsupdate(1M)

ntfscat(1M)

ntfsclone(1M)

ntfscluster(1M)

ntfscmp(1M)

ntfscp(1M)

ntfsfix(1M)

ntfsinfo(1M)

ntfslabel(1M)

ntfsls(1M)

ntfsprogs(1M)

ntfsresize(1M)

ntfsundelete(1M)

nulladm(1M)

nwamd(1M)

obpsym(1M)

oplhpd(1M)

parted(1M)

pbind(1M)

pcitool(1M)

pginfo(1M)

pgstat(1M)

picld(1M)

ping(1M)

pkg2du(1M)

pkgadd(1M)

pkgadm(1M)

pkgask(1M)

pkgchk(1M)

pkgcond(1M)

pkgrm(1M)

plockstat(1M)

pntadm(1M)

polkit-is-privileged(1M)

pooladm(1M)

poolbind(1M)

poolcfg(1M)

poold(1M)

poolstat(1M)

ports(1M)

poweradm(1M)

poweroff(1M)

powertop(1M)

pppd(1M)

pppoec(1M)

pppoed(1M)

pppstats(1M)

praudit(1M)

prctmp(1M)

prdaily(1M)

projadd(1M)

projdel(1M)

projmod(1M)

prstat(1M)

prtacct(1M)

prtconf(1M)

prtdiag(1M)

prtdscp(1M)

prtfru(1M)

prtpicl(1M)

prtvtoc(1M)

psradm(1M)

psrinfo(1M)

psrset(1M)

pwck(1M)

pwconv(1M)

quot(1M)

quota(1M)

quotacheck(1M)

quotaoff(1M)

quotaon(1M)

raidctl(1M)

ramdiskadm(1M)

rarpd(1M)

rcapadm(1M)

rcapd(1M)

rctladm(1M)

rdate(1M)

rdisc(1M)

reboot(1M)

rem_drv(1M)

remove_allocatable(1M)

removef(1M)

reparsed(1M)

repquota(1M)

restricted_shell(1M)

rexd(1M)

rexecd(1M)

rlogind(1M)

rmmount(1M)

rmt(1M)

rmvolmgr(1M)

rndc(1M)

rndc-confgen(1M)

roleadd(1M)

roledel(1M)

rolemod(1M)

root_archive(1M)

route(1M)

routeadm(1M)

routed(1M)

rpcbind(1M)

rpc.bootparamd(1M)

rpcinfo(1M)

rpc.mdcommd(1M)

rpc.metad(1M)

rpc.metamedd(1M)

rpc.metamhd(1M)

rpc.rexd(1M)

rpc.rstatd(1M)

rpc.rusersd(1M)

rpc.rwalld(1M)

rpc.smserverd(1M)

rpc.sprayd(1M)

rpc.yppasswdd(1M)

rpc.ypupdated(1M)

rquotad(1M)

rsh(1M)

rshd(1M)

rstatd(1M)

rtc(1M)

rtquery(1M)

runacct(1M)

rusersd(1M)

rwall(1M)

rwalld(1M)

rwhod(1M)

sa1(1M)

sa2(1M)

sadc(1M)

sar(1M)

sasinfo(1M)

savecore(1M)

sbdadm(1M)

scadm(1M)

sckmd(1M)

scmadm(1M)

sconadm(1M)

sdpadm(1M)

sendmail(1M)

sf880drd(1M)

sftp-server(1M)

shadowd(1M)

shadowstat(1M)

share(1M)

shareall(1M)

sharectl(1M)

share_nfs(1M)

share_smb(1M)

showmount(1M)

shutacct(1M)

shutdown(1M)

slpd(1M)

smattrpop(1M)

smbadm(1M)

smbd(1M)

smbiod(1M)

smbiod-svc(1M)

smbios(1M)

smbstat(1M)

smrsh(1M)

smtnrhdb(1M)

smtnrhtp(1M)

smtnzonecfg(1M)

sasinfo(1M)

sndradm(1M)

sndrd(1M)

sndrsyncd(1M)

snmpdx(1M)

snmp-notify(1M)

snmpXwbemd(1M)

snoop(1M)

soconfig(1M)

soladdapp(1M)

soldelapp(1M)

solstice(1M)

sppptun(1M)

spray(1M)

sprayd(1M)

srptadm(1M)

sshd(1M)

ssh-keysign(1M)

startup(1M)

statd(1M)

stclient(1M)

stmfadm(1M)

stmsboot(1M)

strace(1M)

strclean(1M)

strerr(1M)

sttydefs(1M)

su(1M)

sulogin(1M)

svadm(1M)

svcadm(1M)

svccfg(1M)

svc.configd(1M)

svc.ipfd(1M)

svc.startd(1M)

swap(1M)

sync(1M)

syncinit(1M)

syncloop(1M)

syncstat(1M)

sysconfig(1M)

sysdef(1M)

syseventadm(1M)

syseventconfd(1M)

syseventd(1M)

syslogd(1M)

talkd(1M)

tapes(1M)

tcxconfig(1M)

telnetd(1M)

tftpd(1M)

th_define(1M)

th_manage(1M)

tic(1M)

tncfg(1M)

tnchkdb(1M)

tnctl(1M)

tnd(1M)

tninfo(1M)

tpmadm(1M)

traceroute(1M)

trapstat(1M)

ttymon(1M)

tunefs(1M)

turnacct(1M)

txzonemgr(1M)

tzreload(1M)

tzselect(1M)

uadmin(1M)

ucodeadm(1M)

ufsdump(1M)

ufsrestore(1M)

umount(1M)

umountall(1M)

umount_smbfs(1M)

unlink(1M)

unshare(1M)

unshareall(1M)

unshare_nfs(1M)

系统管理命令-第 3 单元

projmod

- modify a project's information on the system

用法概要

projmod [-n] [-A|-f filename | -]
projmod [-n] [-A|-f filename | -] [-p projid [-o]] 
     [-c comment] [-a|-s|-r] [-U user [,user]... ] 
     [-G group [,group]... ] 
     [ [-K name [=value [,value]...]...]] 
     [-l new_projectname] project

描述

The projmod utility modifies a project's definition on the system. projmod changes the definition of the specified project and makes the appropriate project-related system file and file system changes.

选项

The following options are supported:

-A

Apply the project's resource controls, as defined in the system's project database, to the project if it is active.

-a

Specify that the users, groups, attributes, or attribute values specified by the -U, -G or -K options should be added to the project, rather than replacing the existing member or attribute list.

-c comment

Specify comment as a text string. Generally, comment contains a short description of the project. This information is stored in the project's /etc/project entry.

-f filename | –

Specify the project file to modify or validate or specify input from stdin for validation. As noted under OPERANDS, if you do not specify a project in a projmod command line, projmod validates the argument to -f. If you do not use this option, the system project file, /etc/project, is modified.

-G group [,group...]

Specify a replacement list of member groups of the project. When used in conjunction with the -a or -r options, this option specifies a list of groups to be added or removed from the project.

-K name[=value[,value...]

Specify a replacement list of project attributes for the project. When used in conjunction with the -a, -r, or -s options, this option specifies a list of attribute values to be added, removed, or replaced in the project. Attributes must be delimited by semicolons (;). Multiple -K options can be specified to set, add, remove, or substitute values on multiple keys, such as:

-K key1=value1 -K "key2=(value2a),(value2b)"

Resource control attributes use parentheses to specify values for a key. Because many user shells interpret parentheses as special characters, it is best to enclose an argument to -K that contains parentheses with double quotes, as shown above and in EXAMPLES, below. See resource_controls(5) for a description of the resource controls you can specify for a project.

-l new_projectname

Specify the new project name for the project. The new_projectname argument is a string consisting of characters from the set of alphabetic characters, numeric characters, period (.), underline (_), and hyphen (-). The first character should be alphabetic. An error message is written if these restrictions are not met. The project name must also be unique within the project file.

-n

Syntax check. Check the format of the existing system project file and modifications only. The contents of the existing project file, such as user names, group names, and resources that are specified in the project attributes are not checked.

-o

This option allows the project ID specified by the -p option to be non-unique within the project file.

-p projid

Specify a new project ID for the project. It must be a non-negative decimal integer less than MAXUID as defined in param.h. This value must be unique within the project file if the -o option is not specified.

-r

Specify that the users, groups, attributes, or attribute values specified by the -U, -G or -K options should be removed from the project, rather than replacing the existing member or attribute list.

-s

Specify that the list of attributes specified by the -K option should have their values replaced. If the attributes do not exist, they are added as if the a option was used. This option has no effect the -U or -G options.

-U user [,user...]

Specify a replacement list of member users of the project. When used in conjunction with the -a or -r options, this option specifies a list of users to be added or removed from the project.

操作数

The following operands are supported:

project

An existing project name to be modified or displayed.

(none)

If no operand is given, the project file is validated without modifying any project.

示例

示例 1 Using the -K Option for Addition of an Attribute Value

Consider the following project(4) entry:

salesaudit:111:Auditing Project::sales,finance: \
  process.max-file-size=(priv,52428800,deny); \
  task.max-lwps=(priv,100,deny)

The preceding would appear as one line in /etc/project. For this and the following examples, the focus is on the attributes field in the project entry. That is, the last field, the field following the last semicolon.

The attributes field for the project salesaudit lists the following resource control:

task.max-lwps=(priv,1000,signal=KILL)

The following projmod command adds an action clause to the preceding entry:

# projmod -a -K "task.max-lwps=(priv,100,deny)" salesaudit 

...with the resulting attributes field in the entry for salesaudit:

task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)

示例 2 Using the -K Option for the Substitution of an Attribute Value

Assume an attributes field in a project(4) entry for the project salesaudit that lists the following resource control:

task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)

The following projmod command substitutes the action clause specified in the command for the action clauses in the preceding entry:

# projmod -s -K "task.max-lwps=(priv,500,signal=SIGSTOP)" salesaudit 

...with the resulting attributes field in the entry for salesaudit:

task.max-lwps=(priv,500,signal=SIGSTOP)

示例 3 Using the -K Option for Removal of an Attribute Value

Assume an attributes field in a project(4) entry for a project salesaudit that lists the following resource control:

task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)

The following projmod command removes the first action clause from the preceding entry:

# projmod -r -K "task.max-lwps=(priv,100,deny)" salesaudit 

...with the resulting attributes field in the entry for salesaudit:

task.max-lwps=(priv,1000,signal=KILL)

示例 4 Specifying Multiple Attribute Values

Suppose you want to achieve the following resource controls for the project salesaudit:

task.max-lwps=(priv,100,deny)
process.max-file-size=(priv,50MB,deny)

The following projmod command adds these resource controls for salesaudit:

# projmod -a -K "task.max-lwps=(priv,100,deny)" \
-K "process.max-file-size=(priv,50MB,deny)" salesaudit 

...with the resulting attributes field in the entry for salesaudit:

task.max-lwps=(priv,100,deny);process.max-file-size=(priv,52428800,deny)

In this example, note the effect of the use of the modifier and scaling factor for the resource control process.max-file-size. The specification in projmod:

"process.max-file-size=(priv,50MB,deny)"

...becomes, in /etc/project:

process.max-file-size=(priv,52428800,deny)

That is, 50MB is expanded to 52428800. The modifiers, such as MB, and scaling factors you can use for resource controls are specified in resource_controls(5).

示例 5 Binding a Pool to a Project

The following command sets the project.pool attribute for the project sales.

# projmod -a -K project.pool=salespool sales

示例 6 Evaluating Input from stdin

The following command uses the -f option without a project name operand to evaluate the contents of an NIS projects map.

# ypcat project | projmod -f -

退出状态

In case of an error, projmod prints an error message and exits with one of the following values:

The following exit values are returned:

0

Successful completion.

2

The command syntax was invalid. A usage message for projmod is displayed.

3

An invalid argument was provided to an option.

4

The projid given with the -p option is already in use.

5

The project files contain an error. See project(4).

6

The project to be modified, group, user, or resource does not exist.

9

The project is already in use.

10

Cannot update the /etc/project file.

文件

/etc/group

System file containing group definitions

/etc/project

System project file

/etc/passwd

System password file

/etc/shadow

System file containing users' encrypted passwords and related information

属性

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os
Interface Stability
See below.

Invocation is evolving. Human readable output is unstable.

另请参见

groupadd(1M), groupdel(1M), groupmod(1M), projadd(1M), projdel(1M), useradd(1M), userdel(1M), usermod(1M), passwd(4), project(4), attributes(5), resource_controls(5)

附注

The projmod utility modifies project definitions only in the local /etc/project file. If a network name service such as NIS or LDAP is being used to supplement the local files with additional entries, projmod cannot change information supplied by the network name service. However projmod verifies the uniqueness of project name and project ID against the external name service.