32.8.4. Running subscription-manager as a Post-Install Script


The subscription-manager command-line script registers a system to a Red Hat Subscription Management server (Customer Portal Subscription Management, Subscription Asset Manager, or CloudForms System Engine). This script can also be used to assign or attach subscriptions automatically to the system that best-match that system.
When registering to the Customer Portal, use the Red Hat network login credentials. When registering to Subscription Asset Manager or CloudForms System Engine, use whatever user account was created by the local administrator.
Additional options can be used with the registration command to set a preferred service level for the system and to restrict updates and errata to a specific operating system version.
%post --log=/root/ks-post.log
/usr/sbin/subscription-manager register --username=admin@example.com --password=secret --serverurl=sam-server.example.com --org="Admin Group" --environment="Dev" --servicelevel=standard --release="6.6"
%end
For additional information about using subscription-manager, see the Knowledgebase article at https://access.redhat.com/solutions/748313.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.