gksu / sudo in Dapper: A non privileged user needs to run net work-admin and gnome-cups-manager

Erling Ringen Elvsrud systemansvarlig at vagaungdomsskule.no
Mon Jun 19 12:29:21 BST 2006


        
        Erling Ringen Elvsrud [2006-06-13  7:51 +0200]:
        >> Hello,
        >> 
        >> Scenario: 60 teachers currently use Breezy on laptops. I want
        to
        >> gradually migrate all 60 to Dapper. One of the adjustments 
        >> compared to
        >> the current Breezy install I want to do, is to allow the
        teachers >> to run
        >> network-admin and gnome-cups-manager. How can I enable access
        to >> those 
        >> programs for a non privileged user?
        >> 
        >> I'm a bit confused how gksu / gconf / sudo works together and
        how >> I can
        >> enable access to a single application: can anyone shed some
        light >> on
        >> this issue?
        >
        >gnome-cups-manager does not need root privileges. Just put
        everyone
        >who should become a printer admin into the 'lpadmin' group:
        >
        >  sudo adduser joe lpadmin
        >
        >(for user joe).
        >
        >Allowing normal users to run a particular app with root privs
        is
        >configured in /etc/sudoers (use 'visudo' to edit it!) Please
        read >man
        >sudoers for details. You can either add the teachers one by
        one, >e.g
        >.g with
        >
        >  joe ALL=(ALL) /usr/bin/network-admin
        >
        >or put the users into a special group and just do
        >
        >  %netadmin ALL=(ALL) /usr/bin/network-admin
        
        
        This works, but not for graphical applications like
        network-admin. if I lauch network admin logged in as teacher
        from a terminal window like this I get the following error:
        
        "Xlib: connection to ":0.0" refused by server
        Xlib: No protocol specified
        
        Xlib: connection to ":0.0" refused by server
        Xlib: No protocol specified
        
        
        (network-admin:8622: Gtk-WARNING **: cannot open display:"
        
        It is possible to solve this by copying the .Xauthority file
        from the users home directory to /root, but that is not a
        solution to the problem.
        
        Why does network-admin work when logged in as the first user
        created? (that have full root access via sudo) I cannot
        understand how that user differs from another user added later
        as long as the required changes to /etc/sudoers has been made.
        
        Best regards,
        
        Erling Ringen Elvsrud




More information about the ubuntu-devel mailing list