Re: [Samba] Modifying SWAT views for general users

This is a discussion on Re: [Samba] Modifying SWAT views for general users within the Samba forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --------------050505020203070403020207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed ...


Go Back   Usenet Forums > Networking and Network Related > Samba

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-02-2005
Deryck Hodge
 
Posts: n/a
Default Re: [Samba] Modifying SWAT views for general users

This is a multi-part message in MIME format.
--------------050505020203070403020207
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Roy P Costa wrote:
| I'm looking at having my general Samba users change their own
passwords on
| my Linux server using SWAT. Is there a way that I can have them have
| access to the password changing view and not be able to see the
| configuration and status information. Is there an easy way for those
| "button" to not appear on the web page?
|
|
| Roy Costa
| roycosta at us.ibm.com
|
|

I've just committed the attached patch to SVN. It adds a '-P'
command-line option to SWAT. Running swat -P will now do what you asked
about above -- only show the "Password" menu to read-only users. Please
test it, and let us know if it works out for you. Cheers,

deryck

- --
Deryck Hodge http://www.devurandom.org/
Auburn University Libraries http://www.lib.auburn.edu/
Samba Team http://www.samba.org/

I am flawed but I am cleaning up so well.
- --Dashboard Confessional, from "Vindicated"(2004)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCARjn4glRK0DaE8gRAnA0AJ9kJD5ypPISeNc7XNtdUu fkDVYKcACgow9Y
ztvJGe2eqhkDJ3Jt2msvRRk=
=5WaD
-----END PGP SIGNATURE-----

--------------050505020203070403020207
Content-Type: text/plain;
name="password_menu_only"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="password_menu_only"

Index: source/web/swat.c
================================================== =================
--- source/web/swat.c (revision 5172)
+++ source/web/swat.c (working copy)
@@ -32,6 +32,7 @@
#include "web/swat_proto.h"

static BOOL demo_mode = False;
+static BOOL passwd_only = False;
static BOOL have_write_access = False;
static BOOL have_read_access = False;
static int iNumNonAutoPrintServices = 0;
@@ -530,7 +531,8 @@
image_link(_("Printers"), "printers", "images/printers.gif");
image_link(_("Wizard"), "wizard", "images/wizard.gif");
}
- if (have_read_access) {
+ /* root always gets all buttons, otherwise look for -P */
+ if ( have_write_access || (!passwd_only && have_read_access) ) {
image_link(_("Status"), "status", "images/status.gif");
image_link(_("View Config"), "viewconfig", "images/viewconfig.gif");
}
@@ -1315,6 +1317,7 @@
struct poptOption long_options[] = {
POPT_AUTOHELP
{ "disable-authentication", 'a', POPT_ARG_VAL, &demo_mode, True, "Disable authentication (demo mode)" },
+ { "password-menu-only", 'P', POPT_ARG_VAL, &passwd_only, True, "Show only change password menu" },
POPT_COMMON_SAMBA
POPT_TABLEEND
};

--------------050505020203070403020207
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
--------------050505020203070403020207--
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0