Changing passwords for ACF: Difference between revisions

From Alpine Linux
(corrected the echo command with the `-n` flag)
(Re-defining procedurs on how to set acf-password (now describing 'acfpasswd' feature))
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Changing passwords in Alpine Linux ==
__NOTOC__
 
''Note: this document covers version 1.8 and under. In future versions, the hope is to store the ACF user details in a database to make it more secure.''
 
This provides documentation for beginner Alpine Linux users on how to change passwords for the console login as well as the ACF. It is pretty simple.
This provides documentation for beginner Alpine Linux users on how to change passwords for the console login as well as the ACF. It is pretty simple.


=== Change the password from the command line ===


To change a system user's password on the command line, do the following, where 'username' could be a system user, such as '''root''':
== Changing ACF password using command line ==
Setting ACF password is done in various ways depending on how old your system is.


''passwd username''
=== Set ACF-password on Alpine Linux 1.9 and newer ===
Set the ACF-password for a specific user (where '<TT>username</TT>' could be a system user, such as '<TT>root</TT>'):
{{Cmd|acfpasswd username}}
You would be prompted to enter a new password for this user.
{{Tip|You could set the ACF password to reflect the system user's password. In such case you would run a command that looks like this:
{{Cmd|acfpasswd -s username}}
''(The '<TT>-s</TT>' flag tells the system to copy the system user's password into ACF-password database.)''
}}


The logins and passwords for the ACF users are stored in a separate location: ''/etc/acf/passwd''. Although of course you should change the ACF (web interface) user passwords via the ''System >> User Management'' page, there may be times when you cannot remember the login password for the ACF user, and have to change it from the command line:
=== Set ACF-password on Alpine Linux 1.8 and older ===
The logins and passwords for the ACF users are stored in a separate location: '<TT>/etc/acf/passwd</TT>'.


The syntax for the '''/etc/acf/passwd''' file is as follows:
The syntax for the '<TT>/etc/acf/passwd</TT>' file is as follows:


  username:md5sumpassword::ROLE
  username:md5sumpassword::ROLE


For example, change the default ACF user ''Alpine'' as follows:
For example, change the ACF user '<TT>Alpine</TT>' as follows:


Generate a md5sum hash of the password '''testing123''', and send it to the passwd file:
# Generate a md5sum hash of the password '<TT>testing123</TT>', and send it to the passwd file: {{Cmd|echo -n "testing123" {{!}} md5sum >> /etc/acf/passwd}}
''echo -n "testing123" | md5sum >> /etc/acf/passwd''
# Edit the passwd file to put the hash in the correct place as shown below, deleting the existing hash:
::<pre>Alpine:92707c3c2766ce04133e0f85681add8b::ADMIN</pre>


Edit the passwd file to put the hash in the correct place as shown below, deleting the existing hash:
Alpine:92707c3c2766ce04133e0f85681add8b::ADMIN


=== To change passwords from the ACF Interface ===
== To change passwords from the ACF Interface ==


Log on as a user with the Admin role, which has rights to change user passwords other than it's own.
Log on as a user with the Admin role, which has rights to change user passwords other than it's own.


Browse to ''System >> User Management''
Browse to '''System >> User Management'''
 
Under the Existing Account section, click '''[Edit this account]''' under the user whose password you want to change.
 
Enter the new password in the '<TT>Password</TT>' and '<TT>Password (Confirm)</TT>' fields.


Under the Existing Account section, click '''Edit this account''' under the user whose password you want to change.
Click '''[Save]''' to save the changes.


Enter the new password in the '''Password''' and '''Password (Confirm)''' fields.


Click '''Save''' to save the changes.
== Save changes ==
Remember to commit all changes (if you are running from 'tmpfs'): {{Cmd|lbu ci}}


Finally, remember to commit all changes: ''lbu ci''
[[Category:ACF]]
[[Category:Security]]

Revision as of 15:22, 20 November 2013

This provides documentation for beginner Alpine Linux users on how to change passwords for the console login as well as the ACF. It is pretty simple.


Changing ACF password using command line

Setting ACF password is done in various ways depending on how old your system is.

Set ACF-password on Alpine Linux 1.9 and newer

Set the ACF-password for a specific user (where 'username' could be a system user, such as 'root'):

acfpasswd username

You would be prompted to enter a new password for this user.

Tip: You could set the ACF password to reflect the system user's password. In such case you would run a command that looks like this:

acfpasswd -s username

(The '-s' flag tells the system to copy the system user's password into ACF-password database.)

Set ACF-password on Alpine Linux 1.8 and older

The logins and passwords for the ACF users are stored in a separate location: '/etc/acf/passwd'.

The syntax for the '/etc/acf/passwd' file is as follows:

username:md5sumpassword::ROLE

For example, change the ACF user 'Alpine' as follows:

  1. Generate a md5sum hash of the password 'testing123', and send it to the passwd file:

    echo -n "testing123" | md5sum >> /etc/acf/passwd

  2. Edit the passwd file to put the hash in the correct place as shown below, deleting the existing hash:
Alpine:92707c3c2766ce04133e0f85681add8b::ADMIN


To change passwords from the ACF Interface

Log on as a user with the Admin role, which has rights to change user passwords other than it's own.

Browse to System >> User Management

Under the Existing Account section, click [Edit this account] under the user whose password you want to change.

Enter the new password in the 'Password' and 'Password (Confirm)' fields.

Click [Save] to save the changes.


Save changes

Remember to commit all changes (if you are running from 'tmpfs'):

lbu ci