CentOS / RHEL : How to backup/restore configuration using authconfig

Steps

1. Backup the configuration files using authconfig utility. The general syntax for the command is :

# authconfig --savebackup=[name]

For example :

# authconfig --savebackup=config_backup

2. Backup’s are saved at following location:

# ll /var/lib/authconfig/backup-config_backup/
total 80
-rw-r--r-- 1 root root  401 Oct 28 00:18 authconfig
-rw-r--r-- 1 root root    1 Oct 28 00:18 cacheenabled.conf
-rw-r--r-- 1 root root  830 Oct 28 00:18 fingerprint-auth-ac
-rw-r--r-- 1 root root  512 Oct 28 00:18 krb5.conf
-rw-r--r-- 1 root root 2293 Oct 28 00:18 libuser.conf
-rw-r--r-- 1 root root 1816 Oct 28 00:18 login.defs
-rw-r--r-- 1 root root   67 Oct 28 00:18 network
-rw-r--r-- 1 root root 4290 Oct 28 00:18 nslcd.conf
-rw-r--r-- 1 root root 1722 Oct 28 00:18 nsswitch.conf
-rw-r--r-- 1 root root  464 Oct 28 00:18 openldap.conf
-rw-r--r-- 1 root root 8857 Oct 28 00:18 pam_ldap.conf
-rw-r--r-- 1 root root 1174 Oct 28 00:18 password-auth-ac
-rw-r--r-- 1 root root  882 Oct 28 00:18 smartcard-auth-ac
-rw-r--r-- 1 root root  844 Oct 28 00:18 smb.conf
-rw-r--r-- 1 root root  416 Oct 28 00:18 sssd.conf
-rw-r--r-- 1 root root 1174 Oct 28 00:18 system-auth-ac
-rw-r--r-- 1 root root  585 Oct 28 00:18 yp.conf

3. Configurations can be restored using the following command:

# authconfig --restorebackup=[name]

In our example case :

# authconfig --restorebackup=config_backup
Related Post