Machine names changing on network


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Machine names changing on network
# 1  
Old 09-22-2008
Machine names changing on network

Hello,

this is my first post, and yeah, I'm quite new to UNIX, so please bare with me... My question has to do with a few Macs on a Windows network, but since the question is not OS X specific (I think) or Windows specific (I think), but rather UNIXish (I think) I chose to post here rather than in the OS X part of the forum.

On our Windows Server 2003 network we have mostly Windows PC:s, and then a few Macs running on OS X 10.5. A couple of the Macs change names when connected to the network.

Disconnected the Macs will show this when you open a Terminal/bash window:

Adams Mac:~ adam$

and

Bretts Mac:~ brett$

However, if Adams Mac is connected to the network, instead it will show this:

Brett:~ adam$

Bretts Mac when connected to the network, will show this:

PC1:~ brett$ (PC1 being another client (Windows) on the same network).

I have asked our IT consultants about this, but nobody is having a clue to why this occurs, but everyone telling me it's probably perfectly normal.

Can anybody here explain what this is about, or at least point me in the right direction?

Thanks,

fxj
# 2  
Old 09-23-2008
Maybe check how the prompt is built together. Not sure if there is a variable like PS1 for it on Mac.
# 3  
Old 09-23-2008
Explain? no, but help you find what is going on, yes...
>Disconnected the Macs will show this when you open a Terminal/bash window:
>Adams Mac:~ adam$

What you are talking about here is the prompt no?
In unix this prompt is a variable called PS1
if you type:
Code:
echo $PS1

it should display what it is being asked to display as prompt
e.g.
ant:$PWD \$
In this case ant is an affected variable already substituted: HOSTNAME (will not change...)
while $PWD will constantly change...
how thid is done?
Code:
export PS1=`uname -n`':$PWD \$ '

So you will have to find where PS1 is set, could be in .profile, or in /etc/profile or...
start searching ... good luck!
# 4  
Old 09-23-2008
Thanks for pointing me in the right direction.

Yes, the PS1 is part of OS X as well. If I do a echo $PS1 on one of the Macs, I get:

\h:\W \u\$

According to an Apple manual page, this should - in short - be read out as:

host\ basename of current wd ("~" if the home directory) \ user name of current user \ effective UID

(See Mac OS X Manual Page For bash(1) under "Prompting"...)

If I apply this to what I have seen so far (see my initial post), it tells me that everytime I log one of the Macs onto the network, another client machine becomes the host of that Mac.

So, is this interpretation correct? And how could this happen? Since nobody has (or should have at least) made such settings to the machines, i e nobody has (or should have) set these Macs to become automatically "hosted" by other clients on the network upon logging on...

Also, as a sidenote, we have four Macs on the network; this phenomenon only occurs on two of them, the prompts of the other two remain unaffected whether logged on to the network or not.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing file names

sac_pzs_iv_epoz_hhe__2013.074.14.40.46.0000_2599.365.23.59.59.99999 sac_pzs_iv_epoz_hhn__2013.074.14.40.46.0000_2599.365.23.59.59.99999 sac_pzs_iv_epoz_hhz__2013.074.14.40.46.0000_2599.365.23.59.59.99999 sac_pzs_iv_haga_hhe__2006.111.00.00.00.0000_2599.365.23.59.59.99999... (3 Replies)
Discussion started by: kristinu
3 Replies

2. Debian

Changing file extension names

Hi I have a list of files :root@L28mustang:/var/log/exim4/2017/Jul2017_Blast_BC07# ls -lrt | grep mainlog -rw-r----- 1 Debian-exim adm 3636932 Jul 8 06:25 mainlog.3.gz -rw-r----- 1 Debian-exim adm 919512 Jul 9 06:27 mainlog.2.gz -rw-r----- 1 Debian-exim adm 7655054 Jul 10 06:25 mainlog.1... (1 Reply)
Discussion started by: anaigini45
1 Replies

3. Shell Programming and Scripting

Changing file names

I have a series of files as follows file-1.pdf file-2.pdf file-3.pdf file-4.pdf file-5.pdf file-6.pdf file-7.pdf I want to have the file names with odd numbers starting from an initial number, for example 2000. The result would be the following: file-2001.pdf file-2003.pdf... (9 Replies)
Discussion started by: kristinu
9 Replies

4. Shell Programming and Scripting

Changing file names

I have file names as shown and want to change the name to have only the first four numbers. /home/chrisd/Desktop/nips/nips_2013/5212-learning-feature-selection-dependencies-in-multi-task-learning.pdf /home/chrisd/Desktop/nips/nips_2013/5213-parametric-task-learning.pdf... (3 Replies)
Discussion started by: kristinu
3 Replies

5. Shell Programming and Scripting

changing multiple directory names

Hi guys, I have lots of files that look like: ABC.packed.dir DEF.packed.dir GHI.packed.dir etc... I would like them to have more of the usual naming convention ABC DEF GHI etc... so I was thinking that I could: (2 Replies)
Discussion started by: atjurhs
2 Replies

6. Shell Programming and Scripting

Changing file names

I have lot of files whose names are something like the following. I want to change the name of all the files from 'npt02' to 'n02'. npt02-z30-sr65-rgdt0p50-dc0p01-16x12drw.tpf npt02-z30-sr65-rgdt0p50-dc0p01-8x6drw.back npt02-z30-sr65-rgdt0p50-dc0p01-8x6drw-bst-mis.xy... (5 Replies)
Discussion started by: kristinu
5 Replies

7. Shell Programming and Scripting

Changing names

I have file names m04-npt06-z30-syn.ps m04-npt06-dp018-8x6smp.vmod m04-npt06-sr40-syn-dp01-16x12drw.params m04-npt06-sr40-syn-dp008-16x12drw.params m04-npt06-sr40-syn-dp008-16x12drw.vmod m04-npt06-sr40-syn-dp008-16x12drw.bck m04-npt06-sr40-syn-dp008-16x12drw.exp... (6 Replies)
Discussion started by: kristinu
6 Replies

8. Shell Programming and Scripting

Changing file names with AWK

Dear All, I have some thousands of files in a folder and i need to change those file names without opening the file (no need to change anything in the file content, need to change the file name only). The filenames are as follows: Myfile_name.1_parameter Myfile_name.2_parameter... (6 Replies)
Discussion started by: Fredrick
6 Replies

9. Red Hat

changing ethernet NIC names?

I have an RHEL 5 server with 2 Broadcom on-board NICs and 2 quad-port Intel NICs. After I installed the OS, the Intel NICs became eth0-7, and the onboards are eth8 and eth9. I really need the onboard NICs to be eth0 and eth1 (I have plans to later remove the quad-ports and replace them with 10gE... (1 Reply)
Discussion started by: GKnight
1 Replies

10. Shell Programming and Scripting

changing file names to lowercase

hey guys having some trouble figuring this out. my program is supposed to take a name of a directory as a command line argument and change the filenames inside that directory to lowercase. what i dont get is how you access that directory and go thru all the files and change the filenames... (1 Reply)
Discussion started by: 30177005
1 Replies
Login or Register to Ask a Question