change $HOME of root in Solaris

change $HOME of root in Solaris

Post by michael_m.. » Sat, 25 Mar 2000 04:00:00



if anybody can tell me how to change the $HOME of root in Solaris ?
i just checked the .profile file , and found that i just cant find out
where the values of $HOME is ...can anybody help me ?

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

change $HOME of root in Solaris

Post by Joe Durusa » Sat, 25 Mar 2000 04:00:00


        Unless you are running NIS or NIS+, it's in /etc/passwd
for all users.  BTW, WHY ON EARTH WOULD YOU WANT TO CHANGE IT FOR
THE ROOT ACCOUNT???????

Speaking only for myself,

Joe Durusau


> if anybody can tell me how to change the $HOME of root in Solaris ?
> i just checked the .profile file , and found that i just cant find out
> where the values of $HOME is ...can anybody help me ?

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

change $HOME of root in Solaris

Post by Alcou » Sat, 25 Mar 2000 04:00:00




Quote:>    Unless you are running NIS or NIS+, it's in /etc/passwd
>for all users.  BTW, WHY ON EARTH WOULD YOU WANT TO CHANGE IT FOR
>THE ROOT ACCOUNT???????

Standard reason is if you want root's .dot files not cluttering up /, but
say some special directory like /root.  Some people think it cleaner.

--

"I may disagree with what you say, but I will defend unto the death
your right to say it." (Voltaire)

 
 
 

change $HOME of root in Solaris

Post by Kurt J. Lanz » Sat, 25 Mar 2000 04:00:00



> if anybody can tell me how to change the $HOME of root in Solaris ?
> i just checked the .profile file , and found that i just cant find out
> where the values of $HOME is ...can anybody help me ?

I don't expect root to be any different than any other
user in this respect -- change the entry in /etc/passwd.
 
 
 

change $HOME of root in Solaris

Post by Benoit Mar » Sat, 25 Mar 2000 04:00:00


Hi

$HOME is  the 6th field of the root entry in your /etc/passwd file.

cheers,
--
Benoit MARC

 
 
 

change $HOME of root in Solaris

Post by Rev. Don Koo » Sun, 26 Mar 2000 04:00:00



> if anybody can tell me how to change the $HOME of root in Solaris ?
> i just checked the .profile file , and found that i just cant find out
> where the values of $HOME is ...can anybody help me ?

        To be honest, I've never really checked it out.  I do notice that a
lot of the responses you've gotten offer to change root's home
directory as oppposed to the value of the "HOME" environment
variable.  That of course is just another case of people answering
the question they know the answer to rather than the question that
was asked.  I would be curious if anyone knows the mechanism through
which "HOME" is set and how to muck with it to automatically set
"HOME" to something besides what is in the "passwd" file.

        Of course if you reset "HOME" in the ".profile" or ".cshrc" file,
it will override the value normally set when you log in.

                              Don

--
**********************      You a bounty hunter?
* Rev. Don McDonald  *      Man's gotta earn a living.
* Baltimore, MD      *      Dying ain't much of a living, boy.
**********************             "Outlaw Josey Wales"
http://members.home.net/oldno7

 
 
 

change $HOME of root in Solaris

Post by fina » Sun, 26 Mar 2000 04:00:00


Rev. Don Kool has said that...
  :
  :
  :>
  :> if anybody can tell me how to change the $HOME of root in Solaris ?
  :> i just checked the .profile file , and found that i just cant find out
  :> where the values of $HOME is ...can anybody help me ?
  :
  :     To be honest, I've never really checked it out.  I do notice that a
  :lot of the responses you've gotten offer to change root's home
  :directory as oppposed to the value of the "HOME" environment
  :variable.  That of course is just another case of people answering
  :the question they know the answer to rather than the question that
  :was asked.  I would be curious if anyone knows the mechanism through
  :which "HOME" is set and how to muck with it to automatically set
  :"HOME" to something besides what is in the "passwd" file.
  :
  :     Of course if you reset "HOME" in the ".profile" or ".cshrc" file,
  :it will override the value normally set when you log in.
  :
  :
  :                           Don
  :

From man login:

       When invoked from the login: prompt, the  user  may  enter
       environmental  variables  after the username.  These vari-
       ables are entered in the form NAME=VALUE.  Not  all  vari-
       ables  may  be  set in the fashion, notably PATH, HOME and
       SHELL.  Additionally, IFS may be inhibited if  the  user's
       login shell is /bin/sh.

[snip]

       Your user and group ID will be set according to their val-
       ues in the /etc/passwd file.  The value for $HOME, $SHELL,
       $PATH, $LOGNAME, and $MAIL are set according to the appro-
       priate fields in the password entry.   Ulimit,  umask  and
       nice  values  may  also be set according to entries in the
       GECOS field.

HTH,
final

 
 
 

change $HOME of root in Solaris

Post by Rev. Don Koo » Sun, 26 Mar 2000 04:00:00



> Rev. Don Kool has said that...

>   :> if anybody can tell me how to change the $HOME of root in Solaris ?
>   :> i just checked the .profile file , and found that i just cant find out
>   :> where the values of $HOME is ...can anybody help me ?
>   :
>   :     To be honest, I've never really checked it out.  I do notice that a
>   :lot of the responses you've gotten offer to change root's home
>   :directory as oppposed to the value of the "HOME" environment
>   :variable.  That of course is just another case of people answering
>   :the question they know the answer to rather than the question that
>   :was asked.  I would be curious if anyone knows the mechanism through
>   :which "HOME" is set and how to muck with it to automatically set
>   :"HOME" to something besides what is in the "passwd" file.
>   :
>   :     Of course if you reset "HOME" in the ".profile" or ".cshrc" file,
>   :it will override the value normally set when you log in.
> From man login:

>        When invoked from the login: prompt, the  user  may  enter
>        environmental  variables  after the username.  These vari-
>        ables are entered in the form NAME=VALUE.  Not  all  vari-
>        ables  may  be  set in the fashion, notably PATH, HOME and
>        SHELL.  Additionally, IFS may be inhibited if  the  user's
>        login shell is /bin/sh.

> [snip]

>        Your user and group ID will be set according to their val-
>        ues in the /etc/passwd file.  The value for $HOME, $SHELL,
>        $PATH, $LOGNAME, and $MAIL are set according to the appro-
>        priate fields in the password entry.   Ulimit,  umask  and
>        nice  values  may  also be set according to entries in the
>        GECOS field.

        So the question remains; how to get in the middle of this process.

                              Don

--
**********************      You a bounty hunter?
* Rev. Don McDonald  *      Man's gotta earn a living.
* Baltimore, MD      *      Dying ain't much of a living, boy.
**********************             "Outlaw Josey Wales"
http://members.home.net/oldno7

 
 
 

change $HOME of root in Solaris

Post by Peter Koc » Tue, 28 Mar 2000 04:00:00


Hi!


> BTW, WHY ON EARTH WOULD YOU WANT TO CHANGE IT FOR
> THE ROOT ACCOUNT???????

Because / is sometimes a really BAD choice.
I'd suggest to use a subdirectory in the
root file system (maybe /root).

Tschuess

Peter

 
 
 

change $HOME of root in Solaris

Post by Peter Koc » Tue, 28 Mar 2000 04:00:00


Hi!


> To be honest, I've never really checked it out.  I do notice that a
> lot of the responses you've gotten offer to change root's home
> directory as oppposed to the value of the "HOME" environment
> variable.  That of course is just another case of people answering
> the question they know the answer to rather than the question that
> was asked.  I would be curious if anyone knows the mechanism through
> which "HOME" is set and how to muck with it to automatically set
> "HOME" to something besides what is in the "passwd" file.

RTFS, Don. Or don't you have any sources of some Unix flavour?
Guess what: Get some *BSD or *Linux sources and look trough
that. The general mechanism doesn't differ to the "real"TM Unix.

Tschuess

Peter

 
 
 

change $HOME of root in Solaris

Post by Rev. Don Koo » Tue, 28 Mar 2000 04:00:00




> > To be honest, I've never really checked it out.  I do notice that a
> > lot of the responses you've gotten offer to change root's home
> > directory as oppposed to the value of the "HOME" environment
> > variable.  That of course is just another case of people answering
> > the question they know the answer to rather than the question that
> > was asked.  I would be curious if anyone knows the mechanism through
> > which "HOME" is set and how to muck with it to automatically set
> > "HOME" to something besides what is in the "passwd" file.
> RTFS, Don. Or don't you have any sources of some Unix flavour?
> Guess what: Get some *BSD or *Linux sources and look trough
> that. The general mechanism doesn't differ to the "real"TM Unix.

        It's not really my question, Pete.  

                              Don

--
**********************      You a bounty hunter?
* Rev. Don McDonald  *      Man's gotta earn a living.
* Baltimore, MD      *      Dying ain't much of a living, boy.
**********************             "Outlaw Josey Wales"
http://members.home.net/oldno7

 
 
 

change $HOME of root in Solaris

Post by John Riddoc » Wed, 29 Mar 2000 04:00:00





>> > To be honest, I've never really checked it out.  I do notice that a
>> > lot of the responses you've gotten offer to change root's home
>> > directory as oppposed to the value of the "HOME" environment
>> > variable.  That of course is just another case of people answering
>> > the question they know the answer to rather than the question that
>> > was asked.  I would be curious if anyone knows the mechanism through
>> > which "HOME" is set and how to muck with it to automatically set
>> > "HOME" to something besides what is in the "passwd" file.

>> RTFS, Don. Or don't you have any sources of some Unix flavour?
>> Guess what: Get some *BSD or *Linux sources and look trough
>> that. The general mechanism doesn't differ to the "real"TM Unix.

>    It's not really my question, Pete.  

Well, the answer to your question is that the 'login' program sets it.  In
PAM enabled Unices (eg, Solaris), the PAM module handles that.  If you
_really_ feel that having $HOME different from the passwd entry (whether
files, NIS, NIS+ or whatever) is worthwhile, that is the bit you have to
hack.  Without sources or PAM, you can't do it easily.  Even with sources/PAM,
I doubt it's trivial.

--

http://www.scms.rgu.ac.uk/staff/jr/
Irony: Bill Gates claims to be making a stable Operating System and Linus
Torvalds claims to be taking over the world. (http://coolsig.com/)

 
 
 

change $HOME of root in Solaris

Post by Rev. Don Koo » Thu, 30 Mar 2000 04:00:00






> >> > To be honest, I've never really checked it out.  I do notice that a
> >> > lot of the responses you've gotten offer to change root's home
> >> > directory as oppposed to the value of the "HOME" environment
> >> > variable.  That of course is just another case of people answering
> >> > the question they know the answer to rather than the question that
> >> > was asked.  I would be curious if anyone knows the mechanism through
> >> > which "HOME" is set and how to muck with it to automatically set
> >> > "HOME" to something besides what is in the "passwd" file.
> >> RTFS, Don. Or don't you have any sources of some Unix flavour?
> >> Guess what: Get some *BSD or *Linux sources and look trough
> >> that. The general mechanism doesn't differ to the "real"TM Unix.
> >       It's not really my question, Pete.
> Well, the answer to your question is that the 'login' program sets it.  In
> PAM enabled Unices (eg, Solaris), the PAM module handles that.  If you
> _really_ feel that having $HOME different from the passwd entry (whether
> files, NIS, NIS+ or whatever) is worthwhile, that is the bit you have to
> hack.  Without sources or PAM, you can't do it easily.  Even with sources/PAM,
> I doubt it's trivial.

        Me either.  I thought it an odd question when I first read it.  It
is amazing the schemes that people come up with.  That's what makes
the world go 'round, I suppose.

                              Don

--
**********************      You a bounty hunter?
* Rev. Don McDonald  *      Man's gotta earn a living.
* Baltimore, MD      *      Dying ain't much of a living, boy.
**********************             "Outlaw Josey Wales"
http://members.home.net/oldno7

 
 
 

change $HOME of root in Solaris

Post by Valdis Kletniek » Thu, 30 Mar 2000 04:00:00



> if anybody can tell me how to change the $HOME of root in Solaris ?
> i just checked the .profile file , and found that i just cant find out
> where the values of $HOME is ...can anybody help me ?

Many have answered various aspects of this question already, but I'll add
one more note:

Resist the temptation to make the home directory /home/root, or anything
like that, which doesn't reside on the root filesystem.  Otherwise, Bad
Things can happen if you lose /home or whatever, and are trying to login
to fix the problem.

This is similar to people who set root's login shell to
/usr/local/bin/bash and then wonder why they can't login at
single-user mode, or why some vendor supplied script then blows chunks
(usually because $SHELL doesn't match the shell the script SHOULD have
been invoked with).

Moral: The first like of /etc/passwd looks like it does for a reason.
Be sure you understand the implications before changing. ;)

 
 
 

change $HOME of root in Solaris

Post by Chris Matter » Thu, 30 Mar 2000 04:00:00




> > if anybody can tell me how to change the $HOME of root in Solaris ?
> > i just checked the .profile file , and found that i just cant find out
> > where the values of $HOME is ...can anybody help me ?

> Many have answered various aspects of this question already, but I'll add
> one more note:

> Resist the temptation to make the home directory /home/root, or anything
> like that, which doesn't reside on the root filesystem.  Otherwise, Bad
> Things can happen if you lose /home or whatever, and are trying to login
> to fix the problem.

Yep, root's home directory needs to be on the root filesystem,
but it doesn't need to be root.  I've seen systems that make
root's home directory /root, which is a solution I like.

                  Chris Mattern

 
 
 

1. home directory changed to uid/gid root

hi
Funny thing happens on my linuxbox.
my user directory /home/myname has all of a sudden changed to uid/gid
root.
I'm quite sure that this was done by some system error and not bye me.
Some days ago i've installed pppd and chat and made it work. Maybe this
caused
this incident.
So, if anybody has any idea about this thing, please post your idea.
Thanks

Dirk

2. No route to host problems

3. changing root's home and .forward

4. Startup service

5. Cannot mkdir /home/myuser as root in Solaris 7

6. Appletalk under Linux

7. /root -> /home/root ?

8. Clueless: Installation hangs while clearing screen

9. /home (AIX) and /export/home (Solaris)

10. Why Solaris use /export/home instead of /home?

11. howto change root password on solaris 9 on sparc without CDROM?

12. Changing the root shell for Solaris 2

13. Changing root password details under Trusted Solaris?