This is a discussion on Kde and Wifi within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi everyone! I have a problem that I'm trying to solve. I would like to change the W-Lan settings ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi everyone! I have a problem that I'm trying to solve. I would like to change the W-Lan settings using the function in Control center. But without having to type in root's password. I think it could be done by changing some file but I haven't got a clue on witch file or even where KDE hides everything. Tried to STFW and found a lot of answers but not anything that could help me. An ordinary user should be able to do this I think. I don't feel like giving away the password for root to everyone that borrows my computer and uses it in different environments. Can anyone help me with this? Thank you. //Micke |
| |||
| micke <micke@home.here> wrote: > An ordinary user should be able to do this I think. I don't feel like giving > away the password for root to everyone that borrows my computer and uses it > in different environments. > Can anyone help me with this? I have no experience from Wifi or your KDE tool, but you should probably be able to fix this with sudo. If you configure sudo to delegate root privileges to this tool for this user the user could start the program from a terminal window with something like: sudo kde-wifi-tool regards Henrik -- The address in the header is only to prevent spam. My real address is: hc1(at)poolhem.se Examples of addresses which go to spammers: root@localhost postmaster@localhost |
| |||
| On Fri, 09 Feb 2007 15:56:05 +0000, micke wrote: > Hi everyone! > I have a problem that I'm trying to solve. > I would like to change the W-Lan settings using the function in Control > center. But without having to type in root's password. > I think it could be done by changing some file but I haven't got a clue on > witch file or even where KDE hides everything. > Tried to STFW and found a lot of answers but not anything that could help > me. > An ordinary user should be able to do this I think. I don't feel like giving > away the password for root to everyone that borrows my computer and uses it > in different environments. > Can anyone help me with this? > Thank you. > > //Micke Sounds like a job for sudo. |
| |||
| Thanks for you tips, but it doesn't work with sudo, I solved it by making a bash script that can be started from KDE. It's a bit of a cruel way of doing it but it works. Seems like this KDE thingies doesn't accept sudo but using sudo, iwlist, iwconfig dhcpc and ifconfig worked as it should. But it would have been a nicer way to use the already built in tools don't understand why a basic thing like changing network on a workstation must be a job for root. //Micke |
| |||
| On Mon, 12 Feb 2007 09:47:09 +0000, micke wrote: > Thanks for you tips, but it doesn't work with sudo, I solved it by making a > bash script that can be started from KDE. It's a bit of a cruel way of > doing it but it works. > > Seems like this KDE thingies doesn't accept sudo but using sudo, iwlist, > iwconfig dhcpc and ifconfig worked as it should. But it would have been a > nicer way to use the already built in tools don't understand why a basic > thing like changing network on a workstation must be a job for root. Not sure it'd be what you wanted but KDE uses its own avatar of 'su' twonked in a GUI : 'kdesu yourcommand' The first time you'll have to enter the password but you can select '[x] Remember password' associated to 'yourcommand' and never have to type the pass again. |
| |||
| loki harfagr wrote: > Not sure it'd be what you wanted but KDE uses its own avatar > of 'su' twonked in a GUI : 'kdesu yourcommand' > The first time you'll have to enter the password but you > can select '[x] Remember password' associated to 'yourcommand' > and never have to type the pass again. Thank you! I have to try this. If it works it would be the best solution. //Micke |
| |||
| micke wrote: > loki harfagr wrote: > >> Not sure it'd be what you wanted but KDE uses its own avatar >> of 'su' twonked in a GUI : 'kdesu yourcommand' >> The first time you'll have to enter the password but you >> can select '[x] Remember password' associated to 'yourcommand' >> and never have to type the pass again. Been there, done it, tried it, didn't work.So I won't get the T-shirt . I'll stay with my homebrewed script. It works, not nice, but it works. //Micke |
| |||
| micke <micke@home.here> wrote: > don't understand why a basic thing like changing network on a > workstation must be a job for root. On Unix/Linux root is the administrator account. Network settings like changing IP adress, netmask and gateway address is the work of the administrator. If any user in any network would be allowed to alter these things we would se a lot of problems like multiple machines with the same IP-address. I have an example from real life: A rather skilled user on a company was allowed to administer his own box. He was going to set his box IP address. He knew the hostname of the box and used nslookup to find out which IP address it should have. He did something like this: balrog:~> nslookup hydran Server: 192.168.43.5 Address: 192.168.43.5#53 Non-authoritative answer: Name: hydran Address: 192.168.43.6 Above you can see that the machine "hydran" should have the IP address 192.168.43.6. Unfortunately this user read the result a little bit to quick and took the first IP address he found. Above that is the address 192.168.43.5 which is the address of the DNS server. So this user configured his machine to take the IP adress of the companys DNS server. The result was that about 500 people was unable to use their network as they without DNS couldn't lookup Web servers or even the NFS servers with their home directory. It was rather easy to find out that something was wrong with DNS, but there was nothing wrong with the DNS server and it wasn't as easy to find out which machine had taken the IP address of the DNS server. The above is an example of what a user with administrating powers are able to do. However, you don't need root privileges to stop a network. I have another example of a user which wanted to connect a VCR to his computer. This was before TP network was common and ethernet used coaxial cable instead. The BNC connector on the VCR was a perfect match for the network cable. Who needs a framegrabber when we have ethernet :-). Once again the entire network stopped. regards Henrik -- The address in the header is only to prevent spam. My real address is: hc1(at)poolhem.se Examples of addresses which go to spammers: root@localhost postmaster@localhost |
| |||
| Henrik Carlqvist wrote: > micke <micke@home.here> wrote: >> don't understand why a basic thing like changing network on a >> workstation must be a job for root. > > On Unix/Linux root is the administrator account. Network settings like > changing IP adress, netmask and gateway address is the work of the > administrator. If any user in any network would be allowed to alter these > things we would se a lot of problems like multiple machines with the same > IP-address. I have an example from real life: > > A rather skilled user on a company was allowed to administer his own box. > He was going to set his box IP address. He knew the hostname of the box > and used nslookup to find out which IP address it should have. He did > something like this: > > balrog:~> nslookup hydran > Server: 192.168.43.5 > Address: 192.168.43.5#53 > > Non-authoritative answer: > Name: hydran > Address: 192.168.43.6 > > Above you can see that the machine "hydran" should have the IP address > 192.168.43.6. Unfortunately this user read the result a little bit to > quick and took the first IP address he found. Above that is the address > 192.168.43.5 which is the address of the DNS server. > > So this user configured his machine to take the IP adress of the companys > DNS server. The result was that about 500 people was unable to use their > network as they without DNS couldn't lookup Web servers or even the NFS > servers with their home directory. It was rather easy to find out that > something was wrong with DNS, but there was nothing wrong with the DNS > server and it wasn't as easy to find out which machine had taken the IP > address of the DNS server. > > The above is an example of what a user with administrating powers are able > to do. However, you don't need root privileges to stop a network. I have > another example of a user which wanted to connect a VCR to his computer. > This was before TP network was common and ethernet used coaxial cable > instead. The BNC connector on the VCR was a perfect match for the network > cable. Who needs a framegrabber when we have ethernet :-). Once again the > entire network stopped. > > regards Henrik Thanks I know this. Been working with network for the last 20 years now, so I know what will happen if someone f-cks around with the addresses. What I was and still is after is something that I think every user should be able to do, select the correct network and get the correct IP-address from this network. Not to be allowed to set their own IP-address. I have as I wrote earlier made a script that shows the user a list of Networks, (only two so far) the user selects the network she/he would like to use, receives an IP-address from the chosen network, thats all. This is usefull when traveling with the laptop and being able to select any free network. Using iwlist with the scan function worked god then only to chose the network. Do a dhcpcd of the correct card was simple, then it was up running as it should. I agree NEVER EVER let them set their own IP-address! This script forces them to make a choice between two networks (more can be added if needed, but as now it's more than enough) Lets say 1. NETGEAR 2.HOME That is all info given to the user. Type in 1 or 2 Then the rest is done in background without the user seeing it. The end result is that they have got the correct network WITHOUT having to tamper with the root account. This should be done in the windowmanager but since I can't do any c++ programming I haven't got a clue how to do it. that is scripts. //Micke |
| ||||
| micke wrote: > them to make a choice between two networks (more can be added if needed, > but as now it's more than enough) Lets say > 1. NETGEAR > 2.HOME > That is all info given to the user. > Type in 1 or 2 > Then the rest is done in background without the user seeing it. > The end result is that they have got the correct network WITHOUT having to > tamper with the root account. > > This should be done in the windowmanager but since I can't do any c++ > programming I haven't got a clue how to do it. > that is scripts. perhaps you can use xdialog to nicify your script a little bit: <http://xdialog.dyns.net/> -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| Thread Tools | |
| Display Modes | |
|
|