[ale] Creating a barebones user using vi (for Stephen)

Dow Hurst dhurst at kennesaw.edu
Thu Oct 17 20:51:57 EDT 2002


Stephen,
Under any Unix/Linux system you can add a user the vi way!  As root, 
create the home directory and copy the needed files into it.  I will do 
this under IRIX:

mkdir /d2/dhurst  (you may have /home/dhurst)
cp /etc/stdprofile /d2/dhurst/.profile
cp /etc/stdcshrc /d2/dhurst/.cshrc
cp /etc/stdlogin /d2/dhurst/.login

Then create the user in /etc/passwd using vi:
cp /etc/passwd /etc/passwd.backup
vi /etc/passwd (when file opens hit Shift-G, then hit "o" and type)
dhurst:*:1203:90:Dow Hurst:/d2/dhurst:/bin/tcsh  (now hit Esc and :wq!)

If your using shadow passwords, then run "pwconv".

Now change the ownership of the directory to the new user:
chown -Rh dhurst.users /d2/dhurst

The create your password for the user to get rid of the * in the 
/etc/passwd or /etc/shadow file:
passwd dhurst (You'll have to type it in and retype it for an accuracy 
check)

That is it!  You have a new user done the "vi" way on IRIX!  The 1203 is 
the user id on the machine and the 90 is the group id.  Each user must 
have a different user id but can have the same group id as many users. 
 One caveat is that the umask of root is commonly 022 which creates a 
directory and files with read permissions for world.  You may want to 
change the default mask for root while making users to 027 which will 
"mask" out the world readable bits on files and directories:

umask 027

 After your done you can change it back or just log out:

umask 022

The default umask is set in the "login" program's config file for IRIX 
in /etc/default/login.  We'd need to look around in Linux for the 
equivalent.  Your "dot" files in the new user directory are the big 
difference under Linux.  I described a barebones login for IRIX but 
under Linux you might only have a ".bashrc".  Under IRIX after you login 
at the console a whole bunch of stuff is created in your home directory 
so you have all kinds of graphical fluff to play with.  Under most Linux 
distributions you get the same thing but done by automated tools when 
you create the user.  Depends a lot on the method used to create the 
user.  Hope this helps,
Dow


Stephen Turner wrote:

>well that was a pain in the butt time but i finnally got it to work,
>thanks to the guy that said just remake the password in root later :) your
>a life saver, as for creating the user and password at once, is there a
>better way? i mean first you have to encrypt a password then type the
>encrypted password in with the name and all that? id like to try names and
>passwords with time limits later but im afraid to! lol,
>
>__________________________________________________
>Do you Yahoo!?
>Faith Hill - Exclusive Performances, Videos & More
>http://faith.yahoo.com
>
>---
>This message has been sent through the ALE general discussion list.
>See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
>sent to listmaster at ale dot org.
>
>
>  
>

-- 
__________________________________________________________
Dow Hurst                  Office: 770-499-3428
Systems Support Specialist    Fax: 770-423-6744
1000 Chastain Rd., Bldg. 12
Chemistry Department SC428  Email:dhurst at kennesaw.edu
Kennesaw State University         Dow.Hurst at mindspring.com
Kennesaw, GA 30144
*********************************
*Computational Chemistry is fun!*
*********************************



---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list