List of commits:
Subject Hash Author Date (UTC)
Added rg_change_pass tool cfc9e214ef3bb978e831a68ab6395c74b6604b41 Catalin(ux) M. BOIE 2016-02-14 11:56:10
CSS fixes to make the spaces the same all over the place 6abddc6fc655a8b67537f46106467229ed687dcc Catalin(ux) M. BOIE 2016-02-14 11:19:07
minor: reorder functions 4c02703e69e56289670e96952b49c55fadcab671 Catalin(ux) M. BOIE 2016-02-14 09:40:44
Show ssh key type before number of bits 980da7f8b9c3380c169547c2b1f522e7d52f0398 Catalin(ux) M. BOIE 2016-02-12 05:20:21
Improved a little the error message received by git:// bb2ed8554a00ae532e93bab17285a4a1eb24ec12 Catalin(ux) M. BOIE 2016-02-11 21:13:14
Show the key size in bits when listing ssh keys 31583c21cf178475e546ad47a47e56c6982dff09 Catalin(ux) M. BOIE 2016-02-08 06:23:43
Improved a little the admin report 1f348f2c163ba1320dce223774b2f677f18d6461 Catalin(ux) M. BOIE 2016-02-08 06:23:05
Improved a little how a tree is shown 753af0ef4a6d9fc2f2ddb993335f3c50a3fff2ab Catalin(ux) M. BOIE 2016-02-07 06:46:02
In admin's report, add in the subject the total number of yesterday's changes 02a3b4131626b7023ba87a59b188256a601cd13a Catalin(ux) M. BOIE 2016-02-07 05:52:47
More detailed and correct description for hooks d3045a11eed05c897381ae2cfcbbf91ede1d4910 Catalin(ux) M. BOIE 2016-02-07 05:42:53
docker: fixes and improvements for image generation 37bd416d1664e8d9fcdf4554646618e5dd226e35 Catalin(ux) M. BOIE 2016-02-07 05:42:28
Added bug template and prefill the bug form assigned to field to the owner of the repo 682e787ceb92d770e1a268a9f635e4336102cf3b Catalin(ux) M. BOIE 2016-02-07 05:38:58
Change download location for rocketgit.xml 41bf40104994391fd5d9938ac891157625872c0d Catalin(ux) M. BOIE 2016-02-02 23:04:53
Fixes for data encoding for slack 67b8210aa1c86b891d6760c89ac840f38f4eb025 Catalin(ux) M. BOIE 2016-01-30 17:49:57
Some TODO updates and some minor text fixes d4a5bc8e8bc37021ca2c30899c01d8c54d56e5f6 Catalin(ux) M. BOIE 2016-01-30 17:38:59
Some docker fixes 36c31d723d45a067980217b1c642f6bb77d54fd9 Catalin(ux) M. BOIE 2016-01-30 17:38:25
When adding hooks, help the user by providing some defaults (slack for now) a7f4d8f10f8943508d90e968129b412431a4b0c3 Catalin(ux) M. BOIE 2016-01-30 17:37:50
Store good key string into the database. 460245b306d9e7340969b386eecaaa6cfc7f7431 Catalin(ux) M. BOIE 2016-01-29 18:23:12
Some small fixes for http hooks 43f8db273aedd804b150ee07a1af23b347687975 Catalin(ux) M. BOIE 2016-01-29 18:22:32
Bump version 37e96e0960414a11682c3fc1344e896c93492123 Catalin(ux) M. BOIE 2016-01-25 21:28:45
Commit cfc9e214ef3bb978e831a68ab6395c74b6604b41 - Added rg_change_pass tool
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-02-14 11:56
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-02-14 12:07
Parent(s): 6abddc6fc655a8b67537f46106467229ed687dcc
Signing key:
Tree: 193d3f972bee3c09207cd75c6e5189d91c55bf7f
File Lines added Lines deleted
Makefile.in 5 0
rocketgit.spec.in 1 0
root/themes/default/user/hints/login.html 3 0
tools/rg_change_pass 84 0
File Makefile.in changed (mode: 100644) (index 00feb72..d94a79c)
... ... install: all
35 35 @mkdir -pv $(I_ETC)/logrotate.d @mkdir -pv $(I_ETC)/logrotate.d
36 36 cp -vd samples/logrotate $(I_ETC)/logrotate.d/$(PRJ) cp -vd samples/logrotate $(I_ETC)/logrotate.d/$(PRJ)
37 37 @ @
38 @echo "Installing tools..."
39 @mkdir -pv $(I_USR_SBIN)
40 cp -vd tools/* $(I_USR_SBIN)/
41 @-chown root:root $(I_USR_SBIN)/rg_*
42 @
38 43 @echo "Installing log stuff..." @echo "Installing log stuff..."
39 44 @mkdir -pv $(I_VAR_LOG)/$(PRJ) @mkdir -pv $(I_VAR_LOG)/$(PRJ)
40 45 @-chown -R rocketgit:rocketgit $(I_VAR_LOG)/$(PRJ) @-chown -R rocketgit:rocketgit $(I_VAR_LOG)/$(PRJ)
File rocketgit.spec.in changed (mode: 100644) (index 10ac459..718f039)
... ... rm -rf ${RPM_BUILD_ROOT}
96 96 %attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/q_merge_requests %attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/q_merge_requests
97 97 %attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/sockets %attr(0755,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/sockets
98 98 %attr(0700,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/tmp %attr(0700,rocketgit,rocketgit) %dir @VAR_LIB@/@PRJ@/tmp
99 %attr(0700,root,root) @I_USR_SBIN@/*
99 100 @USR_SHARE@/@PRJ@/* @USR_SHARE@/@PRJ@/*
100 101 @USR_SHARE@/selinux/*/@PRJ@.pp @USR_SHARE@/selinux/*/@PRJ@.pp
101 102
File root/themes/default/user/hints/login.html added (mode: 100644) (index 0000000..5c98b01)
1 <br />
2 If you lose your password, 2fa device or all scratch codes,
3 just run <b>rg_change_pass</b>, as root, on your rocketgit machine.<br />
File tools/rg_change_pass added (mode: 100755) (index 0000000..c79707a)
1 #!/usr/bin/php
2 <?php
3 // Change password for any user
4 error_reporting(E_ALL);
5 ini_set("track_errors", "On");
6 set_time_limit(0);
7
8 $_s = microtime(TRUE);
9
10 require_once("/etc/rocketgit/config.php");
11
12 $INC = dirname(__FILE__) . "/../inc";
13 require_once($INC . "/init.inc.php");
14 require_once($INC . "/log.inc.php");
15 require_once($INC . "/sql.inc.php");
16 require_once($INC . "/struct.inc.php");
17 require_once($INC . "/cache.inc.php");
18 require_once($INC . "/repo.inc.php");
19 require_once($INC . "/prof.inc.php");
20 require_once($INC . "/mr.inc.php");
21 require_once($INC . "/keys.inc.php");
22 require_once($INC . "/user.inc.php");
23 require_once($INC . "/bug.inc.php");
24 require_once($INC . "/fixes.inc.php");
25
26 $uid = posix_getuid();
27 if ($uid !== 0) {
28 echo 'This script must be run with root rights!' . "\n";
29 exit(1);
30 }
31
32 rg_sql_app("rg_change_pass");
33 $db = rg_sql_open($rg_sql);
34 if ($db === FALSE) {
35 echo 'Cannot connect to db: ' . $rg_sql_error() . "!\n";
36 exit(1);
37 }
38
39 $stdin = fopen('php://stdin', 'r');
40 if ($stdin === FALSE) {
41 echo 'Cannot open stdin!' . "\n";
42 exit(1);
43 }
44
45 if ($_SERVER['argc'] < 2)
46 $user = 'admin';
47 else
48 $user = trim($_SERVER['argv'][1]);
49 echo 'Changing password for user ' . $user . "\n";
50
51 echo "New password (will show on the screen, watch your back!): ";
52 $pass = fread($stdin, 128);
53 $pass = trim($pass);
54
55 $ui = rg_user_info($db, 0, $user, '');
56 if ($ui['exists'] != 1) {
57 echo 'User not found!' . "\n";
58 exit(1);
59 }
60
61 $r = rg_user_set_pass($db, $ui['uid'], $pass);
62 if ($r !== TRUE) {
63 echo 'Could not change pass: ' . rg_user_error() . "!\n";
64 exit(1);
65 }
66
67 echo 'Password changed with success!' . "\n";
68
69 if (rg_totp_enrolled($db, $ui['uid'])) {
70 echo 'Please note that user ' . $user . ' is enrolled in 2fa.' . "\n";
71 echo 'Do you want to remove any enrollment (yes/no) [no]: ';
72 $a = trim(fread($stdin, 128));
73 if (strcasecmp($a, 'yes') == 0) {
74 $r = rg_totp_unenroll($db, $ui['uid']);
75 if ($r !== TRUE) {
76 echo 'Cannot unenroll: ' . rg_totp_error() . '!' . "\n";
77 exit(1);
78 }
79
80 echo 'Done unenrolling!' . "\n";
81 }
82 }
83
84 ?>
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main