Quick Linux question

The friendliest place on the web for anyone with an interest in aquariums or fish keeping!
If you have answers, please help by responding to the unanswered posts.
Status
Not open for further replies.
Sorry for not updating.

Tested copy script and it worked fine.
I found a list of all the users in a text file and copy/paste on a windows box into notepad after the copy script.
Code:
chown username:users /home/username
...
chown root:root /home
Used copy/paste like crazy to essentially complete a bunch of chown commands.

Couldn't find any way of doing passwd command. You can't use the -e switch while setting the password. Thank God for tab complete...

The chown part would have been simpler, but I couldn't get the "basename" to work.
Everything tested out okay though and the boss was happy.

Thanks for your help guys... :D
 
I should have explained better: script previous would have changed all the passwords to "yourpass" with moduser and chowned files. Previous code to that does passwd -e. Of course can combine scripts and/or adapt Steve's as you learned earlier. There is a work around for user input but longer script and usermod is effective and "better" practice once you workaround its encrypted password requirement (in this case with openssl, but man recommends crypt just fyi). Maybe you can use this info later. Glad it worked out. :)
 
Status
Not open for further replies.
Back
Top Bottom