Skip to contentSkip to conversation

A few questions

DISCUSSION Adam Luchjenbroers 3 participants 6 messages Dec 1, 2002 – Dec 2, 2002

lore
Share & tools
lore
#0 lore raw

A few questions, two of which because I simply realise I don't know the answers when I probably should, and a third because I'll need to know how.

1) What is the intended method to edit the path for a user-account or globally? I know hacking together a shell script to add a directory and putting it in startup works, but I suspect there is a much more elegant and effective solution.

2) How do I remount devfs?

3) How do I backup all user accounts and passwords. I want to be able to re-install and have all the old user accounts + passwords restored, and also just for general backup purposes.

Signature · 11 lines
"Do not expose your LaserWriter to naked flame..." - Apple LaserWriter Manual

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#1 lore raw

By way of answering question 3, have a look at the sysback script below. Understand I'm going to patch it a little so another version that puts dates in file names for the .log file and the actual backup files as well so another version will appear.

cut here.
#!/bin/sh

# system backup script
# uses tar to do a system backup to zip disks in /dev/hdd4
# excluded directories are: /proc/ and /tmp/
echo "put a zip disk in drive for system backup"
read
cd /
echo "system backup log started:" >/tmp/sysback.log
date >>/tmp/sysback.log
mount -t vfat /dev/hdd4 /zip
tar zcMpPv --exclude=/proc,/tmp --file=/zip/sysback.tar / 2>&1 >>/root/sysback.log
mv /tmp/sysback.log /root/sysback.log
cp /root/sysback.log /var/adm/archive/sysback.log
umount /zip

cut here.
Jude <dashielljt(at)gmpexpress-dot-net>

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
Quoted 4 lines · dashielljt

By way of answering question 3, have a look at the sysback script below. Understand I'm going to patch it a little so another version that puts dates in file names for the .log file and the actual backup files as well so another version will appear.

Nice, but I only wanted to back-up the specific files that held the user accounts. I suspect right now that alot of my disk-space is being used up by assorted junk and I figure backing up the important stuff and re-installing will help me recover it.

Signature · 12 lines
"There is no such thing as sleep deprivation, only caffeine deficiency." - 
Simmons

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#3 lore raw

You'd want to do more than one tar command of the form:
tar zcvf user1.tar.gz /home/user1/
tar zcvf user2.tar.gz /home/user2/
and so on. You'd have to specify the path of user1.tar.gz like where it was going to go and the same for the other archive files too.

Jude <dashielljt(at)gmpexpress-dot-net>

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#4 lore raw
Quoted 5 lines · dashielljt

You'd want to do more than one tar command of the form:
tar zcvf user1.tar.gz /home/user1/
tar zcvf user2.tar.gz /home/user2/
and so on. You'd have to specify the path of user1.tar.gz like where it was going to go and the same for the other archive files too.

Home directories are on a seperate partition, what I want to back up is the actual password/account list.

/etc/passwd seems to hold some of this, but it doesn't appear to show the actual password hashes (unless cat is programmed to replace them all with a 'x').

Signature · 12 lines
"Not Hercules could have knock'd out his brains, for he had none." - 
Shakespeare

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#5 lore raw
Quoted 9 lines · Adam Luchjenbroers
Quoted 5 lines · dashielljt

You'd want to do more than one tar command of the form:
tar zcvf user1.tar.gz /home/user1/
tar zcvf user2.tar.gz /home/user2/
and so on. You'd have to specify the path of user1.tar.gz like where it was going to go and the same for the other archive files too.

Quoted 3 lines

Home directories are on a seperate partition, what I want to back up is the actual password/account list.

/etc/passwd seems to hold some of this, but it doesn't appear to show the actual password hashes (unless cat is programmed to replace them all with a 'x').

The 'x' indicates that you have passwords shadowed (they are held in a seperate file readable only by root).

You can either unshadow the passwords while you do the backup (man pwconv) or just backup the shadow file along with everything else, which is probably less trouble. You need to save these files:

/etc/passwd
/etc/group
/etc/shadow
/etc/gshadow

Since the shadow files are readable only by root, you'll obviously have to be logged in as root to do the backup.

-jdr-

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs