Hi,
To add a user to the system on the commandline, I usually use the adduser command.
# adduser newuser
And that's it. I've been using that command probably out of an old habit, since I've been a long-time Slackware user before. But now I wanted to dig a bit deeper, and some details puzzle me.
Whereas on Slackware, 'adduser' is an interactive shell script to create a user so that basically you don't have to memorize all the 'useradd' switches, CentOS' 'adduser' is a mere symbolic link to 'useradd'.
But when I add a new user (# adduser newuser), I don't use any switches, say to specify the shell, the home directory, the password expiration delay, etcetera. I understand that it is Red Hat (CentOS) tradition to create a separate group for each user. For example, user kikinovak also belongs to a group kikinovak. And when I create a new user 'newuser', the 'newuser' group also got somehow created. Plus, the new user also seems to have his own user profile, with a default .bashrc and so on. My only explanation for that is that CentOS' 'useradd' command doesn't work like the traditional UNIX useradd command and uses a few switches by default. Please correct me if I'm wrong.
Any light on this?
Niki
On Tue, Nov 25, 2008 at 3:28 PM, Niki Kovacs contact@kikinovak.net wrote:
Hi,
To add a user to the system on the commandline, I usually use the adduser command.
# adduser newuser
And that's it. I've been using that command probably out of an old habit, since I've been a long-time Slackware user before. But now I wanted to dig a bit deeper, and some details puzzle me.
Whereas on Slackware, 'adduser' is an interactive shell script to create a user so that basically you don't have to memorize all the 'useradd' switches, CentOS' 'adduser' is a mere symbolic link to 'useradd'.
But when I add a new user (# adduser newuser), I don't use any switches, say to specify the shell, the home directory, the password expiration delay, etcetera. I understand that it is Red Hat (CentOS) tradition to create a separate group for each user. For example, user kikinovak also belongs to a group kikinovak. And when I create a new user 'newuser', the 'newuser' group also got somehow created. Plus, the new user also seems to have his own user profile, with a default .bashrc and so on. My only explanation for that is that CentOS' 'useradd' command doesn't work like the traditional UNIX useradd command and uses a few switches by default. Please correct me if I'm wrong.
Any light on this?
Niki _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi there , you are almost right adduser is only a symbol-link of the useradd in CentOS , for my explanation , it may be security-related you know , to use useradd , you can also specify the home dir,group and so on , but script codes have danger adduser under some distros such as archlinux,slackware is a bash-script , so if you think it's more convenient to use a user-friendly adduser written in bash , you can do it yourself , but before that you should know exactly how to create a new user without useradd-like utilities
Cheers
Thomas Iverson a écrit :
Hi there , you are almost right adduser is only a symbol-link of the useradd in CentOS , for my explanation , it may be security-related you know , to use useradd , you can also specify the home dir,group and so on , but script codes have danger adduser under some distros such as archlinux,slackware is a bash-script , so if you think it's more convenient to use a user-friendly adduser written in bash , you can do it yourself , but before that you should know exactly how to create a new user without useradd-like utilities
Hi,
I just found a copy of "RHEL 5 Unleashed", and there's a very clear chapter about local user management, which explains Red Hat's specific use of 'useradd', especially default options.
Cheers,
Niki
On Tue, Nov 25, 2008 at 4:26 PM, Niki Kovacs contact@kikinovak.net wrote:
Thomas Iverson a écrit :
Hi there , you are almost right adduser is only a symbol-link of the useradd in CentOS , for my explanation , it may be security-related you know , to use useradd , you can also specify the home dir,group and so on , but script codes have danger adduser under some distros such as archlinux,slackware is a bash-script , so if you think it's more convenient to use a user-friendly adduser written in bash , you can do it yourself , but before that you should know exactly how to create a new user without useradd-like utilities
Hi,
I just found a copy of "RHEL 5 Unleashed", and there's a very clear chapter about local user management, which explains Red Hat's specific use of 'useradd', especially default options.
Cheers,
Niki _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Yeah , user management is the basis of system administration , read the document carefully :)
Niki Kovacs wrote:
I just found a copy of "RHEL 5 Unleashed", and there's a very clear chapter about local user management, which explains Red Hat's specific use of 'useradd', especially default options.
One of the golden rules about posting is that you should try and do some basic research on your problem particularly when http://www.centos.org/docs has tons of stuff. There seems to be an influx of Slackware refugees joining the list.
Regards, Vandaman.
On Mon, Nov 24, 2008 at 11:28 PM, Niki Kovacs contact@kikinovak.net wrote:
Hi,
To add a user to the system on the commandline, I usually use the adduser command.
# adduser newuser
And that's it. I've been using that command probably out of an old habit, since I've been a long-time Slackware user before. But now I wanted to dig a bit deeper, and some details puzzle me.
Whereas on Slackware, 'adduser' is an interactive shell script to create a user so that basically you don't have to memorize all the 'useradd' switches, CentOS' 'adduser' is a mere symbolic link to 'useradd'.
Did you try 'man adduser' or 'man useradd?' There's lots of good info there....
mhr