Well, not sure how easy of a method you are looking for, but open
/etc/passwd in vi, copy and paste the user you want to copy, change the
uid/gid/username/home directory and all that stuff, exit. Add them as a
group as well if you do it that way. Run 'pwconv' and then set the user a
password. Or, you can write a perl or shell script to adduser's in bulk,
just make sure you will be the only one editing the /etc/passwd file at any
given time. After you do a bulk add, 'pwconv' and set passwords. (You can
even write a shadow file with crypt from a perl script, but I would suggest
writing the shadow to a temp file first and then copying to /etc/shadow,
archiving the original of course)

Or, I think under Linux you can specify a password to the useradd command,
this would be the ideal way. Just write a simple shell script to read in a
list of new usernames to add and feed them one by one to useradd.

Lastly, always check your password and group file with 'pwck' and 'grpck'.

If you want to replicate home directories, configure /etc/skel and specify
-m to useradd, this will create the home directory and copy everything from
/etc/skel to the new directory with correct permissions. Or do it the hard
way, 'cp -r /home/<username> /home'. 'chown -R username:groupname
/home/<username>'.

-CC

-----Original Message-----
From: Statux [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 7:40 PM
To: [EMAIL PROTECTED]
Subject: User cloning


Today, my friend asked me if there is a way to copy a user's account all
the way down to the passwd/group file data, etc. All the settings and
whatnot, for any one user.

Ideas?:)

-Statux





_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to