<p>Mike, </p>
<p>Leave your sudoers file alone and add your user to the sudo group instead. Much more flexible. </p>
<p>Kevin</p>
<div class="gmail_quote">On Jul 4, 2013 4:28 PM, "Michael Havens" <<a href="mailto:bmike1@gmail.com">bmike1@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I wanted to add my user to the sudoers file so I typed in 'visudo. and put my userid where I figure it should go. Now whenever I type 'sudo <?>' the output of the shell is: </span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><div>bmike1@PresarioLapTop1:/home$ sudo mkdir /backups</div><div>sudo: parse error in /etc/sudoers near line 14</div>
<div>sudo: no valid sudoers sources found, quitting</div><div>sudo: unable to initialize policy plugin</div><div><br></div><div><br></div><div>so I think I'll go in and put it the way it was:</div><div><br></div><div>
bmike1@PresarioLapTop1:/home$ sudo visudo</div><div>sudo: parse error in /etc/sudoers near line 14</div><div>sudo: no valid sudoers sources found, quitting</div><div>sudo: unable to initialize policy plugin</div><div><br>
</div><div>Here is the sudoers file:</div><div><br></div><div><div>#</div><div># This file MUST be edited with the 'visudo' command as root.</div><div>#</div><div># Please consider adding local content in /etc/sudoers.d/ instead of</div>
<div># directly modifying this file.</div><div>#</div><div># See the man page for details on how to write a sudoers file.</div><div>#</div><div>Defaults env_reset</div><div>Defaults mail_badpass</div><div>Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"</div>
<div><br></div><div># Host alias specification</div><div>bmike1</div><div><br></div><div># User alias specification</div><div><br></div><div># Cmnd alias specification</div><div><br></div><div># User privilege specification</div>
<div>root ALL=(ALL:ALL) ALL</div><div><br></div><div># Members of the admin group may gain root privileges</div><div>%admin ALL=(ALL) ALL</div><div><br></div><div># Allow members of group sudo to execute any command</div>
<div>%sudo ALL=(ALL:ALL) ALL</div><div><br></div><div># See sudoers(5) for more information on "#include" directives:</div><div><br></div><div>#includedir /etc/sudoers.d</div></div><div><br></div><div>HEY! Look at that. I put my user in the wrong space. I meant to put it under '# User alias specification' but now I see that is wrong; I needed to put it under '# User privilege specification'.</div>
<div>Also, what about the "ALL's". What do they mean?</div><div>Can I fix this with VI? I'm not just doing it because I don't want to mess this up so bad I need to reinstall</div></div><div>:-)~MIKE~(-:</div>
<br><br><div class="gmail_quote">On Thu, Jul 4, 2013 at 2:56 PM, Michael Havens <span dir="ltr"><<a href="mailto:bmike1@gmail.com" target="_blank">bmike1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_quote"><br></div></div></div></blockquote>
<div>Okay Matt (or anyone else who wants to answer this), could I do this:</div><div>first I make a directory in the usb called 'bmike1-backup'</div><div><br></div><div>#!/bin/bash </div><div>sudo mkdir /backups <-create backups dir</div>
<div>sudo mount /sdc1/backup-bmike1 /backups <- tell computer to see a directory in the usb drive as /backups</div><div>rsync -av /home/bmike1</div><div>sudo umount backups; sudo rmdir backups <-make everything like it was</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_quote"><div>On Sat, Jun 29, 2013 at 12:45 PM, Matt Graham <span dir="ltr"><<a href="mailto:danceswithcrows@usa.net" target="_blank">danceswithcrows@usa.net</a>></span> wrote:<br>
</div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">1. Plug this disk in. Usually, removable disks have 1 partition of type FAT32<br>
or NTFS covering their whole space. (Check that this is the case, if not,<br>
something weird may be going on.)<br>
<br>
2. Make a filesystem with a label on this partition. "mke2fs -j -L MY_BACKUPS<br>
/dev/sdN1" . Find what N is by looking at the output of dmesg | tail.<br>
<br>
3. Make an entry for the partition you made in your /etc/fstab :<br>
<br>
LABEL=MY_BACKUPS /mnt/backup ext3 noauto,users,noatime 0 0<br>
<br>
4. As root, mkdir /mnt/backup if it doesn't exist, then mount this partition<br>
on /mnt/backup , mkdir /mnt/backup/USER , and chown USER /mnt/backup/USER .<br>
<br>
5. Make a shell script sort of like this:<br>
<br>
#!/bin/bash<br>
if [[ $1 == '--help' || $1 == '-h' ]] ; then<br>
echo "backs up ~USER to backup drive."<br>
exit;<br>
fi<br>
<br>
if mount | grep /mnt/backup > /dev/null ; then<br>
rsync -av --delete-after /home/USER/ /mnt/backup/USER<br>
else<br>
echo "backup disk not mounted. Trying to mount it."<br>
mount /mnt/backup<br>
if mount | grep /mnt/backup > /dev/null ; then<br>
echo "Is the disk plugged in? Can't mount, bailing."<br>
exit 1<br>
fi<br>
rsync -av --delete-after /home/USER/ /mnt/backup/USER<br>
umount /mnt/backup<br>
fi<br>
<br>
6. Any time you want to make a backup, plug your disk in, and run that shell<br>
script. The initial rsync will take some time. Subsequent rsyncs will take a<br>
couple of minutes.<br>
<br>
This is AFAICT a reasonably good way to do things, because it doesn't take a<br>
lot of time to keep your backup up to date, and restoring is as simple as<br>
mounting the backup disk and copying things over. Since there is only 1<br>
backup, though, you could delete something, make a backup, then realize you<br>
needed that thing. I have 2 backup disks and rotate them every few days to<br>
make that less likely.<br>
<br>
You could even get fancy and use dm-crypt to back up your stuff to an<br>
encrypted disk, which is useful in some situations like when you want to leave<br>
the disk somewhere that's not under your direct control like a friend's house.<br>
Using dm-crypt makes things a bit more complex, but I can write another<br>
message about that.<br>
<span><font color="#888888"><br>
--<br>
Matt G / Dances With Crows<br>
The Crow202 Blog: <a href="http://crow202.org/wordpress/" target="_blank">http://crow202.org/wordpress/</a><br>
There is no Darkness in Eternity/But only Light too dim for us to see<br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
</font></span></blockquote></div></div></div><br>
</div></div></blockquote></div><br>
</blockquote></div><br>
<br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div>