Use sudoedit in examples instead of "sudo vi"

This commit is contained in:
Todd C. Miller
2016-11-02 17:07:25 -06:00
parent f6ce83ea76
commit a9715211a8
3 changed files with 10 additions and 10 deletions

View File

@@ -549,15 +549,15 @@ EEXXAAMMPPLLEESS
To edit the _i_n_d_e_x_._h_t_m_l file as user www: To edit the _i_n_d_e_x_._h_t_m_l file as user www:
$ sudo -u www vi ~www/htdocs/index.html $ sudoedit -u www ~www/htdocs/index.html
To view system logs only accessible to root and users in the adm group: To view system logs only accessible to root and users in the adm group:
$ sudo -g adm view /var/log/syslog $ sudo -g adm more /var/log/syslog
To run an editor as jim with a different primary group: To run an editor as jim with a different primary group:
$ sudo -u jim -g audio vi ~jim/sound.txt $ sudoedit -u jim -g audio ~jim/sound.txt
To shut down a machine: To shut down a machine:
@@ -621,4 +621,4 @@ DDIISSCCLLAAIIMMEERR
file distributed with ssuuddoo or https://www.sudo.ws/license.html for file distributed with ssuuddoo or https://www.sudo.ws/license.html for
complete details. complete details.
Sudo 1.8.18 January 19, 2016 Sudo 1.8.18 Sudo 1.8.19 January 19, 2016 Sudo 1.8.19

View File

@@ -1096,7 +1096,7 @@ file as user www:
.nf .nf
.sp .sp
.RS 6n .RS 6n
$ sudo -u www vi ~www/htdocs/index.html $ sudoedit -u www ~www/htdocs/index.html
.RE .RE
.fi .fi
.PP .PP
@@ -1105,7 +1105,7 @@ group:
.nf .nf
.sp .sp
.RS 6n .RS 6n
$ sudo -g adm view /var/log/syslog $ sudo -g adm more /var/log/syslog
.RE .RE
.fi .fi
.PP .PP
@@ -1113,7 +1113,7 @@ To run an editor as jim with a different primary group:
.nf .nf
.sp .sp
.RS 6n .RS 6n
$ sudo -u jim -g audio vi ~jim/sound.txt $ sudoedit -u jim -g audio ~jim/sound.txt
.RE .RE
.fi .fi
.PP .PP

View File

@@ -1003,18 +1003,18 @@ To edit the
.Pa index.html .Pa index.html
file as user www: file as user www:
.Bd -literal -offset indent .Bd -literal -offset indent
$ sudo -u www vi ~www/htdocs/index.html $ sudoedit -u www ~www/htdocs/index.html
.Ed .Ed
.Pp .Pp
To view system logs only accessible to root and users in the adm To view system logs only accessible to root and users in the adm
group: group:
.Bd -literal -offset indent .Bd -literal -offset indent
$ sudo -g adm view /var/log/syslog $ sudo -g adm more /var/log/syslog
.Ed .Ed
.Pp .Pp
To run an editor as jim with a different primary group: To run an editor as jim with a different primary group:
.Bd -literal -offset indent .Bd -literal -offset indent
$ sudo -u jim -g audio vi ~jim/sound.txt $ sudoedit -u jim -g audio ~jim/sound.txt
.Ed .Ed
.Pp .Pp
To shut down a machine: To shut down a machine: