LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Permissions

[ILUG] Permissions

Philip Creevy tiger98 at iol.ie
Tue Apr 29 22:25:53 IST 2008


cat returns pico:x:502:bob
ls -l of /dev/bus/usb/001/009 returns 
crw-rw---- 1 root pico 189, 8 Apr 29 22:08 /dev/bus/usb/001/009

A script is checking that the user is in the pico group with

username=$(id -un)
usergroups=$(id -Gn)      id -Gn returns bob at the command line

 # Determine whether the user is in the group of the file
 grouptest=$(echo \ $usergroups\  | sed "s/.*\ \($group\)\ .*/\1/")

I'am not a sed person so I would not know if the above is correct or not
but it does work when logged in as root

On Tue, 2008-04-29 at 20:44 +0100, Ian wrote:
> run 
> 
> cat /etc/group | grep pico 
> 
> this should show all the members of pico
> 
> 
> 
> 
> On Tue, Apr 29, 2008 at 8:03 PM, Philip Creevy <tiger98 at iol.ie> wrote:
>         Hi all,
>         I am going around in circles with a permissions problem.
>         I have a user bob in groups bob, I now create a group pico
>         and add bob to the pico group with "usermod -a -G pico bob"
>         but when I log in as bob and run the groups command bob only
>         shows up in a group call bob and there is no sign of pico.
>         If I log is as root and run groups bob I get bob : bob pico
>         I have set up a USB device with permissions of root:pico
>         and want bob to be able to access this device.
>         Any ideas why bob is not showing up in the pico group.
>         
>         Regards
>         Philip
>         
>         
>         --
>         Irish Linux Users' Group mailing list
>         About this list : http://mail.linux.ie/mailman/listinfo/ilug
>         Who we are : http://www.linux.ie/
>         Where we are : http://www.linux.ie/map/
> 




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell