1subscription-manager(8)     Subscription Management    subscription-manager(8)
2
3
4

NAME

6       subscription-manager  -  Registers systems to a subscription management
7       service and then attaches and manages subscriptions for software  prod‐
8       ucts.
9
10

SYNOPSIS

12       subscription-manager command [options]
13
14

DESCRIPTION

16       subscription-manager is a client program that registers a system with a
17       subscription management service such as the Customer  Portal  Subscrip‐
18       tion Management service or on-premise Subscription Asset Manager.
19
20
21       Red  Hat  provides content updates and support by issuing subscriptions
22       for its products. These subscriptions are applied to  systems;  once  a
23       subscription  for  a  product  is  attached to a system, that system is
24       allowed to install, update, and receive support for that software prod‐
25       uct.  IT  administrators need to track these subscriptions and how they
26       are attached. This subscription management is a feature  available  for
27       Red Hat platforms version 5.7 (and later) and version 6.1 (and later).
28
29
30       For  RHEL  systems,  content  is delivered through the Red Hat Customer
31       Portal. Subscriptions and systems are managed globally through the  Red
32       Hat  subscription management service, which is integrated with the Cus‐
33       tomer Portal. Subscriptions are managed for the local system  by  using
34       the  Red Hat Subscription Manager tool. Subscription Manager is a local
35       client which connects a system with the  subscription  management  ser‐
36       vice.
37
38
39       subscription-manager  is  the command-line based client for the Red Hat
40       Subscription Manager tool.
41
42
43       Subscription Manager performs several key operations:
44
45              * It registers systems to the Red  Hat  subscription  management
46              service  and  adds the system to the inventory. Once a system is
47              registered, it can receive updates based on its subscriptions to
48              any kind of software products.
49
50              * It lists both available and used subscriptions.
51
52              * It allows administrators to both attach specific subscriptions
53              to a system and remove those subscriptions.
54
55       Subscription Manager can be used to auto-attach subscriptions to a sys‐
56       tem,  as  well. The subscription-manager command can even be invoked as
57       part of a kickstart process.
58
59
60       Available subscriptions are based on the specific information about the
61       system's  architecture.  A subscription is only considered available if
62       the platform and hardware can support that specific product.
63
64
65       Subscription Manager also collects and summarizes system facts  related
66       to  its  hardware,  operating  system, and other characteristics. These
67       facts can be edited in the Subscription Manager configuration and  dis‐
68       played through Subscription Manager.
69
70
71       There  is  also a Subscription Manager GUI, which can be invoked simply
72       by running subscription-manager-gui from the command line.
73
74
75       Subscription management is only available for RHEL  5.7/6.1  and  later
76       systems. Older systems should register to Red Hat Network Classic using
77       the rhn_register command.
78
79

COMMANDS AND OPTIONS

81       subscription-manager has specific options available for  each  command,
82       depending  on  what  operation is being performed. Subscription Manager
83       commands are related to the different subscription operations:
84
85
86              1. register
87
88
89              2. unregister
90
91
92              3. attach
93
94
95              4. auto-attach
96
97
98              5. remove
99
100
101              6. release
102
103
104              7. service-level
105
106
107              8. import
108
109
110              9. redeem
111
112
113              10. list
114
115
116              11. refresh
117
118
119              12. environments
120
121
122              13. repos
123
124
125              14. orgs
126
127
128              15. plugins
129
130
131              16. identity
132
133
134              17. facts
135
136
137              18. clean
138
139
140              19. config
141
142
143              20. version
144
145
146              21. status
147
148
149              22. deprecated commands: subscribe, unsubscribe, and activate
150
151
152              23. repo-override
153
154
155
156   COMMON OPTIONS
157       -h, --help
158              Prints the specific help information for the given command.
159
160
161       --proxy=PROXY
162              Uses an HTTP proxy. The PROXY name has the format hostname:port.
163
164
165
166       --proxyuser=PROXYUSERNAME
167              Gives the username to use to authenticate to the HTTP proxy.
168
169
170       --proxypass=PROXYPASSWORD
171              Gives the password to use to authenticate to the HTTP proxy.
172
173
174       --noproxy=NOPROXY
175              Specifies a list of domain suffixes which should bypass the HTTP
176              proxy.
177
178
179   REGISTER OPTIONS
180       The register command registers a new system to the subscription manage‐
181       ment service.
182
183
184       --username=USERNAME
185              Gives the username for the account which is registering the sys‐
186              tem;  this  user account is usually tied to the user account for
187              the  content  delivery  system  which  supplies   the   content.
188              Optional, for user-based authentication.
189
190
191       --password=PASSWORD
192              Gives the user account password.
193
194
195       --serverurl=SERVER_HOSTNAME
196              Passes the name of the subscription service with which to regis‐
197              ter the system. The default value, if this is not given, is  the
198              Customer   Portal  Subscription  Management  service,  subscrip‐
199              tion.rhsm.redhat.com.  If there is  an  on-premise  subscription
200              service  such  as Subscription Asset Manager, this parameter can
201              be used to submit the hostname of the subscription service.  For
202              Subscription  Asset Manager, if the Subscription Manager tool is
203              configured with the Subscription Asset  Manager  RPM,  then  the
204              default  value  for  the  --serverurl  parameter  is for the on-
205              premise Subscription Asset Manager server.
206
207
208
209       --baseurl=https://CONTENT_SERVICE:PORT/PREFIX
210              Passes the name of the content delivery service to configure the
211              yum  service  to  use  to pull down packages. If there is an on-
212              premise subscription service such as Subscription Asset  Manager
213              or  CloudForms System Engine, this parameter can be used to sub‐
214              mit  the  URL  of  the   content   repository,   in   the   form
215              https://server_name:port/prefix.   PREFIX  in particular depends
216              on   the   service   type.    For   example,   https://sam.exam
217              ple.com:8088/sam   is   the   baseurl   for   a   SAM   service.
218              https://sat6.example.com/pulp/repos is the baseurl for a  Satel‐
219              lite   6   service   with   the   hostname   sat6.example.com  .
220              https://cdn.redhat.com is the baseurl for the Red Hat CDN.
221
222
223
224       --name=SYSTEM_NAME
225              Sets the name of the system to register. This  defaults  to  the
226              hostname.
227
228
229
230       --consumerid=CONSUMERID
231              References  an  existing  system  inventory ID to resume using a
232              previous registration for this system. The  ID  is  used  as  an
233              inventory  number  for the system in the subscription management
234              service database. If the system's identity is lost or corrupted,
235              this  option allows it to resume using its previous identity and
236              subscriptions.
237
238
239       --activationkey=KEYS
240              Gives a comma-separated list of product keys to use to redeem or
241              apply  specific  subscriptions  to  the system. This is used for
242              preconfigured systems which may already have products installed.
243              Activation keys are issued by an on-premise subscription manage‐
244              ment service, such as Subscription Asset Manager.
245
246              When the --activationkey option is used, it is not necessary  to
247              use the --username and --password options, because the authenti‐
248              cation information is implicit in the activation key.
249
250              For example:
251              subscription-manager register --org="IT Dept" --activationkey=1234abcd
252
253
254       --auto-attach
255              Automatically attaches compatible subscriptions to this system.
256
257
258
259       --servicelevel=LEVEL
260              Sets the preferred service level to use with subscriptions added
261              to  the  system.  Service levels are commonly premium, standard,
262              and none, though other levels may be available depending on  the
263              product and the contract.
264
265
266       --force
267              Registers the system even if it is already registered. Normally,
268              any register operations will fail if the system is already  reg‐
269              istered. With --force, the existing system entry is unregistered
270              first, all of its subscriptions are returned to  the  pool,  and
271              then the system is registered as a new entry.
272
273
274       --org=ORG
275              Assigns the system to an organization. Infrastructures which are
276              managed on-site may be multi-tenant, meaning that there are mul‐
277              tiple  organizations  within  one customer unit. A system may be
278              assigned manually to one of these organizations. When  a  system
279              is  registered  with  the Customer Portal, this is not required.
280              When a system is registered with an on-premise application  such
281              as Subscription Asset Manager, this argument is required, unless
282              there is only a single organization configured.
283
284
285       --environment=ENV
286              Registers the system to an environment within an organization.
287
288
289       --release=VERSION
290              Shortcut for "release --set=VERSION"
291
292
293   UNREGISTER OPTIONS
294       The unregister command removes a system's subscriptions and removes  it
295       from the subscription management service.
296
297
298       This command has no options.
299
300
301   ATTACH OPTIONS
302       The attach command applies a specific subscription to the system.
303
304
305       --auto Automatically  attaches the best-matched compatible subscription
306              or subscriptions to the  system.  This  is  the  default  unless
307              --pool or --file are used.
308
309
310       --pool=POOLID
311              Gives the ID for the subscriptions pool (collection of products)
312              to attach to the system. This overrides the default of --auto.
313
314
315       --file=FILE
316              Specifies a file from which to  read  whitespace-delimited  pool
317              IDs.  If FILE is "-", the pool IDs will be read from stdin. This
318              overrides the default of --auto.
319
320
321       --quantity=NUMBER
322              Attaches a specified number of subscriptions to the system. Sub‐
323              scriptions  may  have certain limits on them, like the number of
324              sockets on the system or the number of allowed  virtual  guests.
325              It  is  possible  to  attach multiple subscriptions (or stacking
326              subscriptions) to cover the number of sockets, guests, or  other
327              characteristics. May not be used with an auto-attach.
328
329
330
331       --servicelevel=LEVEL
332              Sets the preferred service level to use with subscriptions auto‐
333              matically attached to the system. Service  levels  are  commonly
334              premium,  standard,  and none, though other levels may be avail‐
335              able depending on the product and the contract. This option can‐
336              not be used when attaching specific pools via --pool or --file.
337
338
339   AUTO-ATTACH OPTIONS
340       The  auto-attach command sets whether the ability to check, attach, and
341       update subscriptions occurs automatically on the system. Auto-attaching
342       subscriptions  checks  the  currently-installed products, attached sub‐
343       scriptions, and any changes in available subscriptions every four hours
344       using the rhsmcertd daemon.
345
346
347       --enable
348              Enables  the  auto-attach option for the system. If there is any
349              change in the subscriptions for the  system,  any  subscriptions
350              expire,  or  any  new products are installed, then subscription-
351              manager detects  the  changes  and  automatically  attaches  the
352              appropriate subscriptions so that the system remains covered.
353
354
355       --disable
356              Disables  the  auto-attach option for the system. If auto-attach
357              is disabled, then any changes in installed products or subscrip‐
358              tions  for  the system (including expired subscriptions) must be
359              addressed manually by the administrator.
360
361
362       --show Shows whether auto-attach is enabled on the systems.
363
364
365   REMOVE OPTIONS
366       The remove command removes a subscription from the system.  (This  does
367       not uninstall the associated products.)
368
369
370       --serial=SERIALNUMBER
371              Gives  the serial number of the subscription certificate for the
372              specific product to remove from the  system.  Subscription  cer‐
373              tificates  attached  to  a  system  are  in  a  certificate,  in
374              /etc/pki/entitlement/<serial_number>.pem.   To  remove  multiple
375              subscriptions, use the --serial option multiple times.
376
377
378       --pool=POOLID
379              Removes  all subscription certificates for the specified pool id
380              from the system.  To remove multiple sets of subscriptions,  use
381              the --pool option multiple times.
382
383
384       --all  Removes all of the subscriptions attached to a system.
385
386
387
388   RELEASE OPTIONS
389       The  release command sets a sticky OS version to use when installing or
390       updating packages. This sets a preference for the minor version of  the
391       OS, such as 6.2 or 6.3. This can prevent unplanned or unsupported oper‐
392       ating system version upgrades when an IT environment  must  maintain  a
393       certified configuration.
394
395
396       --list Lists  the available OS versions. If a release preference is not
397              set, then there is a message saying it is not set.
398
399
400       --set=RELEASE
401              Sets the minor (Y-stream) release version to use, such as 6.3.
402
403
404       --unset
405              Removes any previously set release version preference.
406
407
408
409   SERVICE-LEVEL OPTIONS
410       The service-level command displays the current configured service level
411       preference  for  products  installed on the system. For example, if the
412       service-level preference is standard, then a subscription with a  stan‐
413       dard service level is selected when auto-attaching subscriptions to the
414       system.
415
416
417       --serverurl=SERVER_URL
418              Server URL in the form of https://hostname:port/prefix
419
420
421       --insecure
422              Do not check the server SSL certificate against  available  cer‐
423              tificate authorities
424
425
426       --show Shows  the  system's current service-level preference. If a ser‐
427              vice level is not set, then there is a message saying it is  not
428              set.
429
430
431       --list Lists the available service levels.
432
433
434       --set=SERVICE_LEVEL
435              Service level to apply to this system
436
437
438       --unset
439              Removes any previously set service-level preference.
440
441
442
443   IMPORT OPTIONS
444       The  import  command imports and applies a subscription certificate for
445       the system which was generated externally, such as in the Customer Por‐
446       tal,  and then copied over to the system. Importing can be necessary if
447       a system is preconfigured in the subscription management service or  if
448       it  is  offline or unable to access the subscription management service
449       but it has the proper, relevant subscriptions attached to the system.
450
451
452       --certificate=CERTIFICATE_FILE
453              Points to a certificate PEM file which contains the subscription
454              certificate.  This can be used multiple times to import multiple
455              subscription certificates.
456
457
458   REDEEM OPTIONS
459       The redeem command is used for systems that are purchased  from  third-
460       party  vendors  that  include  a  subscription.  The redemption process
461       essentially auto-attaches the preselected subscription that the  vendor
462       supplied to the system.
463
464
465       --email=EMAIL
466              Gives the email account to send the redemption notification mes‐
467              sage to.
468
469
470       --locale=LOCALE
471              Sets the locale to use for the message. If none is  given,  then
472              it defaults to the local system's locale.
473
474
475       --org=ORG
476              Identifies  the organization which issued the subscription being
477              redeemed.
478
479
480
481   LIST OPTIONS
482       The list command lists all of the  subscriptions  that  are  compatible
483       with  a  system. The options allow the list to be filtered by subscrip‐
484       tions that are used by the system  or  unused  subscriptions  that  are
485       available to the system.
486
487
488       --afterdate=YYYY-MM-DD
489              Shows  pools that are active on or after the given date. This is
490              only used with the --available option.
491
492
493       --all  Lists all possible subscriptions that have been purchased,  even
494              if they don't match the architecture of the system. This is used
495              with the --available option.
496
497
498       --available
499              Lists available subscriptions which are not yet attached to  the
500              system.
501
502
503       --consumed
504              Lists all of the subscriptions currently attached to the system.
505
506
507       --installed
508              Lists products which are currently installed on the system which
509              may (or may not) have subscriptions  associated  with  them,  as
510              well  as  products with attached subscriptions which may (or may
511              not) be installed.
512
513
514       --ondate=YYYY-MM-DD
515              Sets the date to use to search for  active  and  available  sub‐
516              scriptions.  The  default  (if not explicitly passed) is today's
517              date; using a later date looks for subscriptions which  will  be
518              active then. This is only used with the --available option.
519
520
521       --no-overlap
522              Shows pools which provide products that are not already covered;
523              only used with --available option.
524
525
526       --match-installed
527              Shows only subscriptions matching products  that  are  currently
528              installed; only used with --available option.
529
530
531       --matches=SEARCH
532              Limits  the output of --installed, --available and --consumed to
533              only subscriptions or products which contain SEARCH in the  sub‐
534              scription   or   product  information,  varying  with  the  list
535              requested and the server version.
536              SEARCH may contain the wildcards ? or * to match a single  char‐
537              acter  or  zero  or  more characters, respectively. The wildcard
538              characters may be escaped with a backslash to represent  a  lit‐
539              eral  question  mark or asterisk. Likewise, to represent a back‐
540              slash, it must be escaped with another backslash.
541
542
543       --pool-only
544              Limits the output of --available and --consumed such  that  only
545              the  pool IDs are displayed. No labels or errors will be printed
546              if this option is specified.
547
548
549   REFRESH OPTIONS
550       The refresh command pulls the latest subscription data from the server.
551       Normally, the system polls the subscription management service at a set
552       interval (4 hours by default) to check for any changes in the available
553       subscriptions. The refresh command checks with the subscription manage‐
554       ment service right then, outside the normal interval.
555
556
557       This command has no options.
558
559
560
561   ENVIRONMENTS OPTIONS
562       The environments command lists all of the environments that  have  been
563       configured for an organization. This command is only used for organiza‐
564       tions which have a locally-hosted subscription or  content  service  of
565       some kind, like Subscription Asset Manager. The concept of environments
566       -- and therefore this command -- have no meaning for environments which
567       use the Customer Portal Subscription Management services.
568
569
570       --username=USERNAME
571              Gives  the  username  for  the  account to use to connect to the
572              organization account.
573
574
575       --password=PASSWORD
576              Gives the user account password.
577
578
579       --org=ORG
580              Identifies the organization for which  to  list  the  configured
581              environments.
582
583
584
585   REPOS OPTIONS
586       The repos command lists all of the repositories that are available to a
587       system. This command is  only  used  for  organizations  which  have  a
588       locally-hosted  content  service  of some kind, like Subscription Asset
589       Manager. With Red Hat's hosted content service, there is only one  cen‐
590       tral repository.
591
592
593       --list Lists  all  of the repositories that are provided by the content
594              service used by the system.
595
596
597       --list-enabled
598              Lists all of the enabled repositories that are provided  by  the
599              content service used by the system.
600
601
602       --list-disabled
603              Lists  all of the disabled repositories that are provided by the
604              content service used by the system.
605
606
607       --enable=REPO_ID
608              Enables the specified repository, which is made available by the
609              content  sources  identified  in  the  system  subscriptions. To
610              enable multiple repositories, use this argument multiple  times.
611              Wild cards * and ? are supported.
612
613
614       --disable=REPO_ID
615              Disables  the  specified  repository, which is made available by
616              the content sources identified in the system  subscriptions.  To
617              disable multiple repositories, use this argument multiple times.
618              Wild cards * and ? are supported.
619
620
621
622   ORGS OPTIONS
623       The orgs command lists all of the organizations which are available  to
624       the specified user account. A multi-tenant infrastructure may have mul‐
625       tiple  organizations  within  a  single  customer,  and  users  may  be
626       restricted  to  access  only  a subset of the total number of organiza‐
627       tions.
628
629
630       --username=USERNAME
631              Gives the username for the account to  use  to  connect  to  the
632              organization account.
633
634
635       --password=PASSWORD
636              Gives the user account password.
637
638
639       --serverurl=SERVER_HOSTNAME
640              Passes  the  name of the subscription service to use to list all
641              available organizations. The orgs command will list all  organi‐
642              zations  for the specified service for which the user account is
643              granted access. The default value, if this is not given, is  the
644              Customer  Portal  Subscription  Management service, https://sub
645              scription.rhsm.redhat.com:443.  If there is an  on-premise  sub‐
646              scription  service  such  as  Subscription  Asset  Manager, this
647              parameter can be used to submit the hostname of the subscription
648              service,  in  the  form [protocol://]servername[:port][/prefix].
649              For Subscription Asset Manager, if the Subscription Manager tool
650              is  configured with the Subscription Asset Manager RPM, then the
651              default value for the  --serverurl  parameter  is  for  the  on-
652              premise Subscription Asset Manager server.
653
654
655
656   PLUGIN OPTIONS
657       The plugins command lists the available subscription-manager plugins.
658
659
660       --list List the available subscription-manager plugins.
661
662
663       --listslots
664              List the available plugin slots
665
666
667       --listhooks
668              List the available plugin slots and the hooks that handle them.
669
670
671       --verbose
672              Show  additional info about the plugins, such as the plugin con‐
673              figuration values.
674
675
676   REPO-OVERRIDE OPTIONS
677       The repo-override command allows the  user  to  manage  custom  content
678       repository settings
679
680
681       --repo The repository to modify (can be specified more than once)
682
683
684       --add=NAME:VALUE
685              Adds  a  named  override with the provided value to repositories
686              specified with the --repo option
687
688
689       --remove=NAME
690              Removes a named override from the  repositories  specified  with
691              the --repo option
692
693
694       --remove-all
695              Removes  all  overrides  from  repositories  specified  with the
696              --repo option
697
698
699       --list Lists all overrides from repositories specified with the  --repo
700              option
701
702
703
704   IDENTITY OPTIONS
705       The identity command handles the UUID of a system, which identifies the
706       system to the subscription management service after registration.  This
707       command  can  simply  return  the UUID or it can be used to restore the
708       registration of a previously-registered system to the subscription man‐
709       agement service.
710
711
712       --regenerate
713              Requests  that  the  subscription management service issue a new
714              identity certificate for the system, using an existing  UUID  in
715              the  original  identity certificate. If this is used alone, then
716              the identity command also uses the original identity certificate
717              to  bind  to the subscription management service, using certifi‐
718              cate-based authentication.
719
720
721       --username=USERNAME
722              Gives the username for the account which is registering the sys‐
723              tem;  this  user account is usually tied to the user account for
724              the  content  delivery  system  which  supplies   the   content.
725              Optional, for user-based authentication.
726
727
728       --password=PASSWORD
729              Gives  the  user  account  password.  Optional,  for  user-based
730              authentication.
731
732
733       --force
734              Regenerates the identity certificate for the system using  user‐
735              name/password authentication. This is used with the --regenerate
736              option.  --regenerate alone will use an existing  identity  cer‐
737              tificate to authenticate to the subscription management service.
738              If the certificate is missing or corrupted or in  other  circum‐
739              stances, then it may be better to use user authentication rather
740              than certificate-based authentication. In that case, the --force
741              option  requires  the username or password to be given either as
742              an argument or in response to a prompt.
743
744
745
746   FACTS OPTIONS
747       The facts command lists the system information, like the  release  ver‐
748       sion, number of CPUs, and other architecture information.
749
750
751       --list Lists  the system information. These are simple attribute: value
752              pairs that reflect much of the information in the /etc/sysconfig
753              directory
754              cpu.architecture: x86_64
755              cpu.core(s)_per_socket: 1
756              cpu.cpu(s): 2
757              cpu.cpu_family: 6
758              cpu.cpu_mhz: 1861.776
759              cpu.cpu_op-mode(s): 64-bit
760              cpu.cpu_socket(s): 2
761              cpu.hypervisor_vendor: KVM
762              cpu.model: 2
763              cpu.numa_node(s): 1
764              cpu.numa_node0_cpu(s): 0,1
765              cpu.stepping: 3
766              cpu.thread(s)_per_core: 1
767              cpu.vendor_id: GenuineIntel
768              cpu.virtualization_type: full
769              distribution.id: Santiago
770              distribution.name: Red Hat Enterprise Linux Workstation
771              distribution.version: 6.1
772              ----
773
774
775
776       --update
777              Updates  the  system information. This is particularly important
778              whenever there is a hardware change (such as adding a CPU) or  a
779              system  upgrade  because  these changes can affect the subscrip‐
780              tions that are compatible with the system.
781
782
783   CLEAN OPTIONS
784       The clean command removes all of the  subscription  and  identity  data
785       from  the  local system without affecting the system information in the
786       subscription management service.  This means that any of the  subscrip‐
787       tions applied to the system are not available for other systems to use.
788       The clean command is useful  in  cases  where  the  local  subscription
789       information  is  corrupted  or lost somehow, and the system will be re-
790       registered using the register --consumerid=EXISTING_ID command.
791
792
793       This command has no options.
794
795
796   CONFIG OPTIONS
797       The config command changes the rhsm.conf  configuration  file  used  by
798       Subscription  Manager. Almost all of the connection information used by
799       Subscription Manager to access  the  subscription  management  service,
800       content  server,  and  any proxies is set in the configuration file, as
801       well as general configuration parameters like the  frequency  Subscrip‐
802       tion  Manager  checks  for subscriptions updates. There are major divi‐
803       sions in the rhsm.conf file, such as [server] which is used to  config‐
804       ure the subscription management service. When changing the Subscription
805       Manager configuration, the settings are identified with the format sec‐
806       tion.name and then the new value. For example:
807
808              server.hostname=newsubscription.example.com
809
810
811       --list Prints the current configuration for Subscription Manager.
812
813
814       --remove=section.name
815              Deletes  the current value for the parameter without supplying a
816              new parameter. A blank value tells Subscription Manager  to  use
817              service  default  values  for  that  parameter.  If there are no
818              defaults, then the feature is ignored.
819
820
821       --section.name=VALUE
822              Sets a parameter to a new, specified  value.  This  is  commonly
823              used for connection settings:
824
825              * server.hostname (subscription management service)
826
827              * server.proxy
828
829              * server.proxy_port
830
831              * server.proxy_user
832
833              * server.proxy_password
834
835              * rhsm.baseurl (content server)
836
837              * rhsm.certFrequency
838
839
840   VERSION OPTIONS
841       The version command displays information about the current Subscription
842       Manager package, the subscription service the system is  registered  to
843       (if it is currently registered), and the subscription management server
844       that the system is configured to use. For example:
845
846              [root@server ~]# subscription-manager version
847              server type: Red Hat Subscription Management
848              subscription management server: 0.9.18-1
849              subscription management rules: 5.9
850              subscription-manager: 1.12.1-1.git.28.5cd97a5.fc20
851              python-rhsm: 1.11.4-1.git.1.2f38ded.fc20
852
853
854       This command has no options.
855
856
857
858   STATUS OPTIONS
859       The status command  shows  the  current  status  of  the  products  and
860       attached  subscriptions  for the system. If some products are not fully
861       covered or subscriptions have expired, then the  status  command  shows
862       why subscriptions are not current and returns an error code.
863
864              [root@server ~]# subscription-manager status
865              +-------------------------------------------+
866                   System Status Details
867              +-------------------------------------------+
868              Overall Status: Current
869
870
871
872       --ondate=DATE
873              Shows  the  system status for a specific date in the future. The
874              format of the date is YYYY-MM-DD.
875
876              [root@server ~]# subscription-manager status --ondate=2014-01-01
877              +-------------------------------------------+
878                   System Status Details
879              +-------------------------------------------+
880              Overall Status: Insufficient
881
882
883   DEPRECATED COMMANDS
884       As the structures of subscription configuration have changed,  some  of
885       the  original  management commands have become obsolete. These commands
886       have been replaced with updated commands.
887
888
889       subscribe
890              This has been  replaced  with  attach.  A  similar  registration
891              option, --subscribe, has also be replaced with --auto-attach.
892
893
894       unsubscribe
895              This has been replaced with remove.
896
897
898       activate
899              This has been replaced with redeem.
900
901

USAGE

903       subscription-manager has two major tasks:
904
905
906              1.  Handling  the registration for a given system to a subscrip‐
907              tion management service
908
909
910              2. Handling the product subscriptions for installed products  on
911              a system
912
913
914       subscription-manager  makes  it  easier  for  network administrators to
915       maintain parity between software subscriptions and  updates  and  their
916       installed  products  by  tracking  and  managing what subscriptions are
917       attached to a  system  and  when  those  subscriptions  expire  or  are
918       exceeded.
919
920
921
922   REGISTERING AND UNREGISTERING MACHINES
923       A  system  is either registered to a subscription management service --
924       which makes all of the subscriptions available to the system --  or  it
925       is not registered. Unregistered systems necessarily lack valid software
926       subscriptions because there is no way to record that the  subscriptions
927       have been used nor any way to renew them.
928
929
930       The default subscription management service in the Subscription Manager
931       configuration is the Customer Portal Subscription  Management  service.
932       The configuration file can be edited before the system is registered to
933       point to an on-premise subscription management service  like  Subscrip‐
934       tion Asset Manager.
935
936
937       Systems  are usually registered to a subscription management service as
938       part of their initial configuration, such as the firstboot or kickstart
939       process.  However,  systems  can  be registered manually after they are
940       configured, can be removed from a content service, or re-registered.
941
942
943       If a system has never been registered (not even during firstboot), then
944       the  register  command will register the system with whatever subscrip‐
945       tion management service is configured in the /etc/rhsm/rhsm.conf  file.
946       This  command  requires, at a minimum, the username and password for an
947       account to connect to the subscription management service. If the  cre‐
948       dentials  aren't  passed  with  the  command, then subscription-manager
949       prompts for the username and password interactively.
950
951
952       When there is a single organization or when using the  Customer  Portal
953       Subscription  Management  service,  all  that  is required is the user‐
954       name/password set. For example:
955
956              subscription-manager register --username=admin --password=secret
957
958
959       With on-premise subscription services, such as Subscription Asset  Man‐
960       ager,  the  infrastructure is more complex. The local administrator can
961       define independent groups called organizations which represent physical
962       or  organizational divisions (--org). Those organizations can be subdi‐
963       vided into environments (--environment).  Optionally,  the  information
964       about what subscription service (--serverurl) and content delivery net‐
965       work (--baseurl) to use for the system registration can also be  passed
966       (which overrides the Red Hat Subscription Manager settings). The server
967       and content URLs are usually configured  in  the  Subscription  Manager
968       configuration before registering a system.
969
970              subscription-manager register --username=admin --password=secret
971              --org="IT Dept" --environment="local dev" --serverurl=local-cloudforms.example.com --baseurl=https://local-cloudforms.example.com:8088/cfFe
972
973
974
975       If  a  system  is in a multi-tenant environment and the organization is
976       not provided with the registration request, registration fails  with  a
977       remote  server error. In the rhsm.log, there will be errors about being
978       unable to load the owners interface.
979
980
981
982       If a system is registered and then somehow its subscription information
983       is lost -- a drive crashes or the certificates are deleted or corrupted
984       -- the system can be  re-registered,  with  all  of  its  subscriptions
985       restored, by registering with the existing ID.
986
987              subscription-manager register --username=admin
988              --password=secret --consumerid=1234abcd
989
990
991       A  system  uses an SSL client certificate (its identity certificate) to
992       authenticate to the  subscriptions  system  to  check  for  updates  or
993       changes  to  subscriptions. If the identity certificate is lost or cor‐
994       rupted, it can be regenerated using the identity command.
995
996              subscription-manager identity --regenerate
997
998
999       Using the --force option will prompt for the username and password  for
1000       the  account,  if one isn't given, and then return the new inventory ID
1001       and the hostname of the registered system.
1002
1003       subscription-manager identity --force
1004       Username: jsmith
1005       Password:
1006       eff9a4c9-3579-49e5-a52f-83f2db29ab52 server.example.com
1007
1008
1009
1010       A system is unregistered and removed from the  subscription  management
1011       service  simply by running the unregister command. Unregistering a sys‐
1012       tem and removing its attached subscriptions can free  up  subscriptions
1013       when a system is taken offline or moved to a different department.
1014
1015              subscription-manager unregister
1016
1017
1018       An  option  with registration, --auto-attach, will automatically attach
1019       the subscriptions pool which best matches the system  architecture  and
1020       configuration to the newly-registered system. This option attaches sub‐
1021       scriptions as part of the registration process, rather than  separately
1022       managing subscriptions.
1023
1024              subscription-manager register --username=admin --password=secret
1025              --auto-attach
1026
1027
1028       Auto-attach  also  supports  an option to set a preferred service level
1029       with the selected subscriptions, the  --servicelevel  option.  In  this
1030       case,  the --servicelevel option sets a preference that helps the auto-
1031       attach process select appropriate subscriptions. For  example,  if  the
1032       preferred  service  level for a production server is premium, and there
1033       are three matching subscriptions with different service  levels  (none,
1034       standard,  and  premium), the auto-attach process selects the subscrip‐
1035       tion which offers a premium service level.
1036
1037              subscription-manager register --username=admin --password=secret
1038              --auto-attach --servicelevel=premium
1039
1040
1041   LISTING, ATTACHING, AND REMOVING SUBSCRIPTIONS FOR PRODUCTS
1042       A subscription is essentially the right to install,  use,  and  receive
1043       updates  for a Red Hat product. (Sometimes multiple individual software
1044       products are bundled together into a single subscription.) When a  sys‐
1045       tem  is registered, the subscription management service is aware of the
1046       system and has a list of all of the possible product subscriptions that
1047       the  system  can install and use. A subscription is applied to a system
1048       when the system is attached to the subscription pool  that  makes  that
1049       product  available.  A  system  releases  or  removes that subscription
1050       (meaning, it removes that subscription so that another system  can  use
1051       that subscription count).
1052
1053
1054       list command shows you what subscriptions are available specifically to
1055       the system (meaning subscriptions  which  are  active,  have  available
1056       quantities,  and  match the hardware and architecture) or all subscrip‐
1057       tions for the organization. Using the --ondate option  shows  subscrip‐
1058       tions  that  are  or  will  be active at a specific time (otherwise, it
1059       shows subscriptions which are active today).
1060
1061              subscription-manager list --available --ondate=2012-01-31
1062              +-------------------------------------------+
1063                  Available Subscriptions
1064              +-------------------------------------------+
1065              Subscription Name:  Red Hat Enterprise Linux
1066              SKU:           SYS0395
1067              Pool Id:       8a85f981302cbaf201302d899adf05a9
1068              Quantity:      249237
1069              Service Level:      None
1070              Service Type:       None
1071              Multi-Entitlement:  No
1072              Starts:             01/01/2021
1073              Ends:               01/01/2022
1074              Machine Type:       physical
1075
1076
1077       The list command can also be used to show what products  you  currently
1078       have installed, as a way of tracking what products you have versus what
1079       subscriptions you have on the system.
1080
1081              subscription-manager list --installed
1082
1083              +-------------------------------------------+
1084                  Installed Product Status
1085              +-------------------------------------------+
1086
1087              ProductName:   Red Hat Enterprise Linux Server
1088              Product ID:    69
1089              Version:  6.3
1090              Arch:          x86_64
1091              Status:        Subscribed
1092              Started:  07/26/2012
1093              Ends:          08/31/2015
1094
1095
1096       The list can be filtered to only include products or subscriptions that
1097       match the query string provided to --matches option.
1098
1099              subscription-manager list --installed --matches="*Server*"
1100
1101              +-------------------------------------------+
1102                  Installed Product Status
1103              +-------------------------------------------+
1104
1105              ProductName:   Red Hat Enterprise Linux Server
1106              Product ID:    69
1107              Version:  6.3
1108              Arch:          x86_64
1109              Status:        Subscribed
1110              Started:  07/26/2012
1111              Ends:          08/31/2015
1112
1113
1114       Attaching a subscription requires the ID for the subscription pool (the
1115       --pool option). For example:
1116
1117              subscription-manager attach
1118              --pool=ff8080812bc382e3012bc3845da100d2
1119
1120       As with the register command, the system can be  auto-attached  to  the
1121       best-fitting  subscriptions.  This is the default action and is equiva‐
1122       lent to  using the --auto option:
1123
1124              subscription-manager attach
1125
1126
1127
1128       Auto-attach also supports an option to set a  preferred  service  level
1129       with  the  selected  subscriptions,  the --servicelevel option. In this
1130       case, the --servicelevel option sets a preference that helps the  auto-
1131       attach  process  select  appropriate subscriptions. For example, if the
1132       preferred service level for a production server is premium,  and  there
1133       are  three  matching subscriptions with different service levels (none,
1134       standard, and premium), the auto-attach process selects  the  subscrip‐
1135       tion which offers a premium subscription.
1136
1137              subscription-manager attach --servicelevel=premium
1138
1139
1140       Some  subscriptions  define  a  count based on attributes of the system
1141       itself, like the number of sockets or the number of virtual guests on a
1142       host.  You  can  combine  multiple  subscriptions together to cover the
1143       count. For example, if there is a four socket server, you can  use  two
1144       subscriptions  for  "RHEL  Server  for Two Sockets" to cover the socket
1145       count. To specify the number of subscriptions to use, use  the  --quan‐
1146       tity option. For example:
1147
1148              subscription-manager attach
1149              --pool=ff8080812bc382e3012bc3845da100d2
1150              --quantity=2
1151
1152
1153       Removing subscription from a system releases the subscription back into
1154       the pool. The system remains registered with the  subscription  manage‐
1155       ment  service.  Each  product  has  an  identifying  X.509  certificate
1156       installed with it. To remove a subscription  for  a  specific  product,
1157       specify the serial number (or numbers, in multiple --serial options) of
1158       the certificate:
1159
1160              subscription-manager remove --serial=1128750306742160
1161
1162
1163       Giving the remove command with the --all option removes every subscrip‐
1164       tion the system has used.
1165
1166
1167
1168   REDEEMING EXISTING SUBSCRIPTIONS
1169       Sometimes,  a system may come preconfigured with products and subscrip‐
1170       tions. Rather than attaching a pool and claiming a  subscription,  this
1171       system simply needs to redeem its existing subscriptions.
1172
1173
1174       After  registration,  subscriptions  on  preconfigured  systems  can be
1175       claimed using the redeem command, which essentially  auto-attaches  the
1176       system to its preexisting subscriptions.
1177
1178              subscription-manager redeem --email=admin@example.com --org="IT Dept"
1179
1180
1181   VIEWING LOCAL SUBSCRIPTION & CONTENT PROVIDER INFORMATION
1182       Red  Hat  has  a  hosted environment, through the Customer Portal, that
1183       provides centralized access  to  subscription  management  and  content
1184       repositories.  However,  organizations can use other tools -- like Sub‐
1185       scription Manager -- for content hosting and  subscription  management.
1186       With  a local content provider, the organization, environments, reposi‐
1187       tories, and other structural configuration is performed in the  content
1188       provider.  Red  Hat  Subscription  Manager  can be used to display this
1189       information, using the environments, orgs, and repos commands.
1190
1191              subscription-manager repos --list
1192
1193              subscription-manager environments --username=jsmith
1194              --password=secret --org=prod
1195
1196              subscription-manager orgs --username=jsmith
1197              --password=secret
1198
1199
1200   CHANGING SUBSCRIPTION MANAGER CONFIGURATION
1201       The Subscription Manager CLI and GUI both use  the  /etc/rhsm/rhsm.conf
1202       file for configuration, including what content and subscription manage‐
1203       ment services to use and management settings like auto-attaching.  This
1204       configuration  file  can  be edited directly, or it can be edited using
1205       the config command. Parameters and values are passed as arguments  with
1206       the config command in the format --section.parameter=value , where sec‐
1207       tion is the configuration section in the file: server, rhsm,  rhsmcertd
1208       or logging.
1209
1210
1211       For example, to change the hostname of the subscription management ser‐
1212       vice host:
1213
1214              subscription-manager config --server.hostname=myserver.example.com
1215
1216
1217       The entries in the logging section are somewhat special.  The  keys  in
1218       this section are a name of a logger.  The values are the logging level.
1219
1220       Valid levels are one of: DEBUG , INFO , WARNING , ERROR , or CRITICAL
1221
1222       Valid logger names are the full module path of any Subscription Manager
1223       module.  For example: subscription_manager or subscription_manager.man‐
1224       agercli
1225
1226
1227       There are three main top-level loggers: subscription_manager, rhsm, and
1228       rhsm-app.  All logger names begin with one of the above.
1229
1230
1231       To set the default log level for all loggers (that  are  not  otherwise
1232       set  in  the  logging  section),  edit  the  default_log_level  key  in
1233       /etc/rhsm/rhsm.conf
1234
1235
1236
1237   UPDATING FACTS
1238       The information about a system, such as its hardware and CPU, its oper‐
1239       ating  system  versions, and memory, are collected by Subscription Man‐
1240       ager in a list of facts.  Subscription  Manager  uses  these  facts  to
1241       determine  what purchased subscriptions are compatible with the system.
1242       Whenever these facts change (such as installing an additional CPU), the
1243       facts can be updated immediately using the facts command.
1244
1245              subscription-manager facts --update
1246
1247       The  collected  facts can also be overridden by creating a JSON file in
1248       the /etc/rhsm/facts/ directory. These have simple formats that define a
1249       fact and value:
1250
1251              {"fact1": "value1","fact2": "value2"}
1252
1253
1254       Any fact override file must have a .facts extension.
1255
1256
1257       When  these fact files are added, running the facts command will update
1258       the collected facts with the new, manual facts or values.
1259
1260
1261   SUBSCRIPTIONS AND KICKSTART
1262       The subscription-manager tool can be run as a  post-install  script  as
1263       part  of  the  kickstart installation process. This allows subscription
1264       management (registering and applying  subscriptions)  to  be  automated
1265       along with installation. For example:
1266
1267              %post --log=/root/ks-post.log
1268              /usr/sbin/subscription-manager register --username admin --password secret --org 'east colo' --auto-attach --servicelevel=premium --force
1269
1270

NETWORK INFORMATION

1272       The  subscription-manager  tool  uses  outgoing  HTTPS requests. In the
1273       default configuration it will use HTTPS on port 443 to the subscription
1274       servers  subscription.rhsm.redhat.com  and to the content delivery ser‐
1275       vice cdn.redhat.com.
1276
1277       For information about the network addresses  that  subscription-manager
1278       and  the  subscription-manager  yum  plugin use see https://access.red
1279       hat.com/site/solutions/59586
1280
1281

PROXY CONFIGURATION

1283       subscription-manager can be configured to use a proxy in several ways:
1284
1285              * via standard HTTP_PROXY , HTTPS_PROXY ,  NO_PROXY  environment
1286              variables (environment-level settings)
1287
1288              *  via  options  in  /etc/rhsm/rhsm.conf (application-level set‐
1289              tings)
1290
1291              * via command-line arguments (command-level overrides)
1292
1293
1294       Although subscription-manager respects environment variables for  proxy
1295       configuration,  this  should  be  avoided in favor of the configuration
1296       file, because the daemons (ex.  rhsmcertd and rhsmd )  do  not  provide
1297       ways to modify their environments.
1298
1299       Each  option  of  the  proxy configuration (hostname, port, host/domain
1300       pattern blacklist, username,  password)  is  read  independently,  with
1301       precedence  being command-line over configuration over environment, and
1302       then the resulting set of options is used to configure the  proxy  con‐
1303       figuration.
1304
1305       For example, if the HTTP_PROXY environment variable is set and no_proxy
1306       is set in /etc/rhsm/rhsm.conf then both are present  in  the  effective
1307       proxy configuration.
1308
1309       If  two equivalent options are set in different places, then the prece‐
1310       dence determines which value is effective.
1311
1312       For example, the NO_PROXY environment variable is set and the  no_proxy
1313       configuration file option is set, then the value from the configuration
1314       file is the effective value.
1315
1316

FILES

1318              * /etc/pki/consumer/*.pem
1319
1320              * /etc/pki/entitlement/<serial>.pem
1321
1322              * /etc/pki/product/*.pem
1323
1324              * /etc/rhsm/rhsm.conf
1325
1326              * /etc/rhsm/facts/*.facts
1327
1328

AUTHORS

1330       Deon Lackey, <dlackey@redhat.com>, and Pradeep Kilambi,  <pkilambi@red‐
1331       hat.com>
1332
1333
1334
1335
1336                                                       subscription-manager(8)
Impressum