# dbsd-nettray w/o password?



## indulekha (Dec 29, 2009)

Hi, 
This may be a stupid question, but...
I'm setting up a new user account so a friend of mine can use my laptop. She's normally a windows user but will probably be ok with kde *if* I can get dbsd-nettray to work without requiring the root password for her to use it. I added it to /etc/sudoers, but it still demands root's password in order to configure it.
Anyone know a way to allow her to access those settings without the root password?


----------



## SirDice (Dec 29, 2009)

Sudo doesn't require root's password, it requires the user's password. Also /etc/sudoers shouldn't exist, it's normally /usr/local/etc/sudoers.

Now, I also can't find dbsd-nettray in the ports or anywhere else. Are you sure you're using FreeBSD?


----------



## indulekha (Dec 29, 2009)

Yes, I know it's /usr/local/etc/sudoers, and that running sudo requires the user's password. I was hoping to allow my friend to run dbsd-nettray's configuration w/o needing a password, or failing that at least w/o needing root's password. As I said, she's a windows user -- meaning she cannot be induced (and should not be trusted) to use the CLI. Therefore, when she logs in I have her account set up to use kde3. dbsd-nettray loads and all that jazz, but it wants root's password to configure it. Obviously that's a problem since she will need to connect to various networks when away from home.

BTW, dbsd-nettray is part of the desktopbsd-tools port. But thanks for assuming I'm a complete moron though.


----------



## SirDice (Dec 29, 2009)

> BTW, dbsd-nettray is part of the desktopbsd-tools port. But thanks for assuming I'm a complete moron though.



I've never used desktopbsd. And I couldn't find it in the ports, combined with the mentioning of sudoers in /etc/ made me believe it wasn't FreeBSD :e

No idea how dbsd-nettray works though. If it uses gksu to pop up for root's password you can easily change that to gksudo.

As for not asking for a password, something like this in your sudoers should do it:


```
myfriend     mylaptop = NOPASSWD: /path/to/dbsd-nettray
```

Instead of having her use the commandline you could create a launcher that just executes a little script


----------



## indulekha (Dec 29, 2009)

Yes that's what I thought regarding sudoers, but that entry does not work. Probably the problem is that dbsd-nettray is called by kde3, and lives in the system tray throughout the session. It will not execute if I SUID it, I tried that. And allowing her to start dbsd-nettray isn't the problem -- the problem is when you right click it to connect to another network it demands the root password. Writing a script to execute it as root is perhaps my best solution, I was just hoping for something more elegant.


----------

