[Linux-disciples] Editing files on a server

Jason Smith pelican317 at mac.com
Thu Dec 22 12:07:48 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Dec 22, 2005, at 10:41 AM, Adam Rosi-Kessel wrote:

> Jason Smith wrote:
>> I need to add a user to sudoers. I connect to this machine via ssh.
>> Query, what is the best way to edit this file. I'm not so handy  
>> with the
>> text editors typically used so would rather just copy the file to my
>> personal computer running OS X, edit it with textwrangler and then  
>> copy
>> it back. I guess I've never figured out how to move files back and  
>> forth
>> from a remote machine that you are connected to with ssh.
>> any pointers? would i use SCP or SFTP?
>
> Editing sudoers is a potentially dangerous operation; hence there is a
> wrapper script known as visudo that opens sudoers up in an editor  
> and then
> runs some sanity checks on the file before putting it back in  
> place. visudo
> uses the vim text editor by default although there are in certain  
> cases ways
> to override that.

Ok. Based on this and Steve's email it seems safe to say I should add  
users to the file on the machine itself rather than my initial plan  
for solving this problem. How would you edit this file though if you  
were far away? Do you just run visudo remotely??


>
> Learning vim is a great investment if you plan on spending much of  
> your life
> in a unix-y world. I am famous[0] for my personal aphorism, "A  
> man's editor
> is his castle."

I've given it a whirl but haven't remained sufficiently dedicated to  
it to make it through the learning curve. Do you use vim for all your  
work and general text editing?



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDqt1pWecT8/cuAfMRAjYNAJ4zbwjSIM+NZgyWsTjr30QQmLTNTQCgu8yG
OSbJy+P9oV3VWejJUld8iZk=
=MTo1
-----END PGP SIGNATURE-----


More information about the Linux-disciples mailing list