The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Change users login name spacewalker AIX 9 03-20-2006 11:09 AM
pswd change on sco GUI login qphillips SCO 3 10-03-2005 07:39 AM
How to i change the login banner in obsd 3.3 vip3r BSD 2 10-02-2003 09:22 AM
Login screen change miredale UNIX for Dummies Questions & Answers 2 10-25-2002 09:18 AM
Password change at login???? rrivas UNIX for Dummies Questions & Answers 4 08-12-2002 06:02 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-24-2002
lorcet222 lorcet222 is offline
Registered User
  
 

Join Date: Jan 2002
Posts: 7
Question change login dir

Ok when I log in to my terminal I land in a dir. How can I change the dir that I start from when I login?

Thanks for the help, sure it is a no brainer for you guys

cd
  #2 (permalink)  
Old 01-24-2002
sTorm's Avatar
sTorm sTorm is offline
Registered User
  
 

Join Date: Jan 2002
Location: Switzerland, Zurich
Posts: 32
You can change the dir in the /etc/passwd file, or use the usermod command.
usermod -d newdir loginname
or
usermod -d newdir -m loginname to move the content of the old dir to the new one.

Last edited by sTorm; 01-24-2002 at 08:32 AM..
  #3 (permalink)  
Old 01-24-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
If this is for the root user, here is something I discovered the other day.

root:/root> cd
root:/root> echo $HOME
/root
root:/root> HOME=/
root:/root> cd
root:/> echo $HOME
/
root:/> HOME=/root
root:/> cd
root:/root>
root:/root> HOME=/usr/local/bin
root:/root> cd
root:/usr/local/bin> HOME=/root
root:/usr/local/bin> cd
root:/root>


There is a variable called $HOME. You can modify it to be what ever you want. When you type "cd" <enter> that is where you will go. As in the example above.

You can make this permanent by putting in the bottom of your .profile. export HOME=/some/dir.

This works for any user, even root and application user IDs.


  #4 (permalink)  
Old 01-28-2002
lorcet222 lorcet222 is offline
Registered User
  
 

Join Date: Jan 2002
Posts: 7
I tried the " usermod " command and it seems that my unix (Mac OSX) does not have this command. Any other options???



thanks
cd
  #5 (permalink)  
Old 01-28-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
UNIX or Apple???...

Are you sure that you are running UNIX or are you running Apple's OSX that is based (coded in) UNIX? OSX was created with UNIX because it is more stable. Unless I am mistaken, you are actually running Apple OS that is built on top of UNIX.

This is like saying that you are running DOS when you are actually running Win98.

Correct me if I am wrong.
  #6 (permalink)  
Old 01-29-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Darwin (the underlying OS in OSX) is based on BSD4.4, so generally speaking, it is Unix.

lorcet222, log in to a command prompt (as root), and execute the following command:

pico /etc/passwd

If you don't have pico, you'll have to use another (harder to use) editor. Anyways, though, look for a line that begins with your username. You'll see something like this:

samba:x:1005:100wner of samba files:/home/samba:/bin/false

Now look in the sixth colon-delimited field (in this case it says /home/samba, yours will be different). That is your home directory - where you will be when you first log in. Now if you change that to another directory, THATS where you'll start. Just be sure that you have the rights to be in that directory.

Let us know how it goes.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0