User Tools

Site Tools


root

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
root [2015/12/28 00:51] adminroot [2015/12/28 03:18] (current) admin
Line 1: Line 1:
 =====root===== =====root=====
 +For years I had been using an ultra simple program to allow root access without a password. It was called **root**(1) and in spite of a couple of bugs which I'd mainly fixed I generally just liked it. So easy to set up - just put the allowed uid's into ''/etc/rooters'' and off you go. 
 +
 +Well blow me down, I lost the sources. Not on my backups. Not in cvs. What the heck had I done with it? No good googling - 'root' is just too general a name.
 +        
 +So I re-wrote it from scratch and (apologies to the original author), its a darn sight better now (it even evaluates its arguments correctly if they contain spaces, which the old 'root' didn't). I also got it to add ''/sbin /usr/sbin'' and ''/usr/local/sbin'' to 'PATH' while I was at it, and allowed root to run it themselves. So now, it's just awesome!
 +
 +Why not **sudo**(1)? I hear you say. Well, this is much simpler to administer and generally less picky. Of course, it's most likely less secure, so if you're vulnerable, bone up on **sudo**(1).
 +        
 +Here it is. To compile just do this as root:
 +
 +  cc -o root root.c
 +  chown root root
 +  chmod 4755 root
 +  cp root /usr/local/bin # or anywhere you like
 +
 +Then put your allowed uids (use 'id -u') into ''/etc/rooters'' and then do this as root:
 +  chown root /etc/rooters
 +  chmod 600 /etc/rooters
 +
 +Here's the source: {{ root.c }}. No I won't post binaries, you really shouldn't trust me that much!
 +
 +
root.1451289119.txt.gz · Last modified: 2015/12/28 00:51 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki