Re: Create user account from putty (Newbie)



On Oct 27, 12:25 pm, goarilla <"kevin DOT paulus AT skynet DOT be">
wrote:
cather...@xxxxxxxxxxxxxx wrote:
Hi all, I'm a Linux newbie and I would like to be able to
programatically create a new user account on my VPS.

I'm running CentOs as the operating system and I would like to be able
to create the new account via putty as well as do the following:

Add a new user and specify the users password (The home directory for
this user should also get created). Also, when the account is created
copy over some files from a specified directory and place them in the
newly created home directory.

I have looked on the Internet but I'm a bit confused with all the
flags which are needed and I do not want to do a trial an error
approach. So if someone could please give me an example on how I can
do the above it would be appreciated

Thanks
Catherine

basically you have the useradd (non-interactive) and adduser
(interactive) commands to add users
and don't forget groupadd, gpasswd and usermod ( to manage groups -
noninteractive cmd's ! )

adduser is the simplest it prompts you for some information:
uid, initial group, password, ...

i don't know if adduser abhores it but i don't see no reason why not.
useradd usually copies the contents from 'the skeleton directory' to a
new users' home dir
and sets permissions right, default skeleton dir is usually /etc/skel

also if you are root you can set any users password by doing this
passwd <user>

PS: what's a VPS ? very personal server ?- Hide quoted text -

- Show quoted text -

Thanks everyone
Catherine

.



Relevant Pages

  • Re: VPC for Mac...So Frustrating! :(
    ... VPS from another account. ... But the Windows file is in the Shared and ... package. ...
    (microsoft.public.mac.virtualpc)
  • Re: I have to log in twice
    ... I created another account for myself. ... entry from /etc/passwd in emacs and then created the user again. ... new account with adduser, deleted it with emacs and recreated it with adduser ...
    (comp.os.linux.misc)
  • Re: I have to log in twice
    ... Allan Adler writes: ... I created another account for myself. ... When I give the user name and passwd the second time, ... new account with adduser, deleted it with emacs and recreated it with adduser ...
    (comp.os.linux.misc)
  • Re: I have to log in twice
    ... I created another account for myself. ... entry from /etc/passwd in emacs and then created the user again. ... When I give the user name and passwd the second time, ... new account with adduser, deleted it with emacs and recreated it with adduser ...
    (comp.os.linux.misc)
  • I have to log in twice
    ... I created another account for myself. ... entry from /etc/passwd in emacs and then created the user again. ... When I give the user name and passwd the second time, ... new account with adduser, deleted it with emacs and recreated it with adduser ...
    (comp.os.linux.misc)