Tag Info

New answers tagged

0

I ended up using this, inspired from this post #!/bin/bash if [ $# -ne 1 ] then echo "Usage: $0 <user>" else u=${2%.*} u=${u//[aeiou]} echo "$2:$u" > .tmp useradd $2 < .tmp chpasswd fi


1

You can use useradd and chpasswd to automate user creation. e.g. useradd -c "Bob Smith" -m bob echo "bob:mypassword" | chpasswd If you don't want the plain text password to appear in the script, use the --encrypted flag echo "bob:encrypted_mypassword" | chpasswd --encrypted


0

You can add users to your Oracle Linux system using the useradd command as root. If you need to add a group as well, use the groupadd command. You can see extended help for both commands by typing man useradd and man groupadd at your terminal prompt. Here's an Article from Oracle explaining exactly how to manage users on Oracle Linux. An example: useradd ...


1

Depending on what files you want, you can create a new group (/etc/group) and make the file writable (and the directory containing it if you want the user to create new files) by that group (e.g., chgrp <groupname> <file>; chmod g+w <file>


1

Letting adduser choose a user ID is the right way to do it. This won't conflict with official packages because automatically-assigned UIDs and statically-assigned UIDs are in different ranges. Yes, this does lead to different user IDs across systems; there's no easy way to do that because you'd have to tell the whole world (every system administrator and ...


1

The RHEL6 migration guide documents that there's a list for statically-assigned UIDs in /usr/share/doc/setup-*/uidgid, which currently goes up to roughly 200, and dynamic system users count downwards from 499. I read that as "use adduser -r in this case and certainly don't worry if you stay above 300; you won't collide unless you have hundreds of system ...



Top 50 recent answers are included