Body
Here it goes, The people at one of the ministries here in Egypt want a windows clone.
How can you ask them to open a terminal and type smbpasswd foo bar ? No way, So I had to put this dirty piece of code :-(
diff -x configure -x '*.in' -x autom4te.cache -x aclocal.m4 -x 'Makefile*' -Naur userdrake-0.5/src/fileuserlib.c userdrake-0.5.modified/src/fileuserlib.c
--- userdrake-0.5/src/fileuserlib.c 2002-03-13 00:30:57.000000000 +0200
+++ userdrake-0.5.modified/src/fileuserlib.c 2005-05-04 22:41:21.000000000 +0300
@@ -812,6 +812,12 @@
}
}
else {
+ gchar *foo = g_strdup_printf("smbpasswd -a %s %s", user->login, user->passwd);
+ gchar *foo2 = g_strdup_printf("smbpasswd -e %s", user->login);
+ // g_message ("%s %s", user->login, user->passwd);
+ system(foo);
+ system(foo2);
+
#ifdef DEBUG
g_message("passwd update for user %s", user->login);
#endif
- 2102 views
Add new comment