Logging into Photon.

bridged with qdn.public.qnxrtp.os
Adam K Kirchhoff

Logging into Photon.

Post by Adam K Kirchhoff » Thu Jan 01, 2004 3:49 am

Hello all. I've recently installed 6.2.1 onto a free SCSI drive and am
delighted to have QNX back up and running again.

I have, however, run into a slight problem: I've created a normal user
("adamk") but can't log in through the photon login screen. I can,
however, telnet in as this user, and login through the console and
launch photon with ph.

Any ideas what I might be doing wrong? I type in my username and
password, hit enter, and both the username and password clear. I can
log in as root without any problems.

Adam

Adam K Kirchhoff

Re: Logging into Photon.

Post by Adam K Kirchhoff » Thu Jan 01, 2004 9:56 pm

Adam K Kirchhoff <adamk@voicenet.com> wrote:
Hello all. I've recently installed 6.2.1 onto a free SCSI drive and am
delighted to have QNX back up and running again.

I have, however, run into a slight problem: I've created a normal user
("adamk") but can't log in through the photon login screen. I can,
however, telnet in as this user, and login through the console and
launch photon with ph.

Any ideas what I might be doing wrong? I type in my username and
password, hit enter, and both the username and password clear. I can
log in as root without any problems.
Quick followup:

I just noticed that when I switch to text mode after attempting to log
in through Photon, there's something along the line of "Don't know how
to set root to /home/adamk" on the console.

I thought that perhaps my permissions on /home/adamk (700) were too
strict, but opening them up didn't help any.

Adam

David Gibbs

Re: Logging into Photon.

Post by David Gibbs » Mon Jan 05, 2004 3:55 pm

Adam K Kirchhoff <adamk@voicenet.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Hello all. I've recently installed 6.2.1 onto a free SCSI drive and am
delighted to have QNX back up and running again.

I have, however, run into a slight problem: I've created a normal user
("adamk") but can't log in through the photon login screen. I can,
however, telnet in as this user, and login through the console and
launch photon with ph.

Any ideas what I might be doing wrong? I type in my username and
password, hit enter, and both the username and password clear. I can
log in as root without any problems.
Quick followup:

I just noticed that when I switch to text mode after attempting to log
in through Photon, there's something along the line of "Don't know how
to set root to /home/adamk" on the console.

I thought that perhaps my permissions on /home/adamk (700) were too
strict, but opening them up didn't help any.
Who owns /home/adamk?

Have you changed the permissions on /home?

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Adam K Kirchhoff

Re: Logging into Photon.

Post by Adam K Kirchhoff » Mon Jan 05, 2004 4:44 pm

David Gibbs <dagibbs@qnx.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Hello all. I've recently installed 6.2.1 onto a free SCSI drive and am
delighted to have QNX back up and running again.

I have, however, run into a slight problem: I've created a normal user
("adamk") but can't log in through the photon login screen. I can,
however, telnet in as this user, and login through the console and
launch photon with ph.

Any ideas what I might be doing wrong? I type in my username and
password, hit enter, and both the username and password clear. I can
log in as root without any problems.
Quick followup:

I just noticed that when I switch to text mode after attempting to log
in through Photon, there's something along the line of "Don't know how
to set root to /home/adamk" on the console.

I thought that perhaps my permissions on /home/adamk (700) were too
strict, but opening them up didn't help any.

Who owns /home/adamk?
user adamk, group adamk (the group is from memory, I don't have access
to that partition at the moment).
Have you changed the permissions on /home?
Didn't touch those permissions. I can confirm this when I get home.

Adam

Adam K Kirchhoff

Re: Logging into Photon.

Post by Adam K Kirchhoff » Tue Jan 06, 2004 10:39 pm

Adam K Kirchhoff <adamk@voicenet.com> wrote:
David Gibbs <dagibbs@qnx.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Hello all. I've recently installed 6.2.1 onto a free SCSI drive and am
delighted to have QNX back up and running again.

I have, however, run into a slight problem: I've created a normal user
("adamk") but can't log in through the photon login screen. I can,
however, telnet in as this user, and login through the console and
launch photon with ph.

Any ideas what I might be doing wrong? I type in my username and
password, hit enter, and both the username and password clear. I can
log in as root without any problems.
Quick followup:

I just noticed that when I switch to text mode after attempting to log
in through Photon, there's something along the line of "Don't know how
to set root to /home/adamk" on the console.

I thought that perhaps my permissions on /home/adamk (700) were too
strict, but opening them up didn't help any.

Who owns /home/adamk?

user adamk, group adamk (the group is from memory, I don't have access
to that partition at the moment).

Have you changed the permissions on /home?

Didn't touch those permissions. I can confirm this when I get home.
Alright, I finally managed to take a look:

[ adamk@sorrow - ~ ]: ls -lad /home
drwxrwxr-x 3 root root 4096 Dec 31 21:01 /home
[ adamk@sorrow - ~ ]: ls -lad /home/adamk
drwxrwxrwx 14 adamk adamk 4096 Jan 06 17:59 /home/adamk

Those are the permissions and owners of the directories.

Any ideas why, then, I can't log in through Photon?

Adam

David Gibbs

Re: Logging into Photon.

Post by David Gibbs » Wed Jan 07, 2004 5:17 pm

Adam K Kirchhoff <adamk@voicenet.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
David Gibbs <dagibbs@qnx.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Have you changed the permissions on /home?

Didn't touch those permissions. I can confirm this when I get home.
Alright, I finally managed to take a look:

[ adamk@sorrow - ~ ]: ls -lad /home
drwxrwxr-x 3 root root 4096 Dec 31 21:01 /home
[ adamk@sorrow - ~ ]: ls -lad /home/adamk
drwxrwxrwx 14 adamk adamk 4096 Jan 06 17:59 /home/adamk

Those are the permissions and owners of the directories.

Any ideas why, then, I can't log in through Photon?
Nope, I, unfortunately, have no idea. :(

Maybe someone more familiar with the Photon login side of things
can figure it out, I'm mostly an OS guy, not a GUI guy.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Adam K Kirchhoff

Re: Logging into Photon.

Post by Adam K Kirchhoff » Thu Jan 08, 2004 1:29 am

David Gibbs <dagibbs@qnx.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
David Gibbs <dagibbs@qnx.com> wrote:
Adam K Kirchhoff <adamk@voicenet.com> wrote:
Have you changed the permissions on /home?

Didn't touch those permissions. I can confirm this when I get home.
Alright, I finally managed to take a look:

[ adamk@sorrow - ~ ]: ls -lad /home
drwxrwxr-x 3 root root 4096 Dec 31 21:01 /home
[ adamk@sorrow - ~ ]: ls -lad /home/adamk
drwxrwxrwx 14 adamk adamk 4096 Jan 06 17:59 /home/adamk

Those are the permissions and owners of the directories.

Any ideas why, then, I can't log in through Photon?

Nope, I, unfortunately, have no idea. :(

Maybe someone more familiar with the Photon login side of things
can figure it out, I'm mostly an OS guy, not a GUI guy.
Any Photon gurus want to take a stab at this?

Adam

Wojtek Lerch

Re: Logging into Photon.

Post by Wojtek Lerch » Thu Jan 08, 2004 3:39 am

"Adam K Kirchhoff" <adamk@voicenet.com> wrote in message
news:btibq0$plh$1@inn.qnx.com...
Any Photon gurus want to take a stab at this?
How did you create the user -- -- did you use the passwd utility?

Could you post the user's line from /etc/passwd here?

Adam K Kirchhoff

Re: Logging into Photon.

Post by Adam K Kirchhoff » Thu Jan 08, 2004 10:42 am

Wojtek Lerch <wojtek_l@yahoo.ca> wrote:
"Adam K Kirchhoff" <adamk@voicenet.com> wrote in message
news:btibq0$plh$1@inn.qnx.com...
Any Photon gurus want to take a stab at this?

How did you create the user -- -- did you use the passwd utility?
I didn't see an 'adduser' utility, so I added the user to the passwd
file, created the home directory, and then changed the passwd with
'passwd'.
Could you post the user's line from /etc/passwd here?
adamk:*:501:501:Adam K Kirchhoff:/home/adamk:/usr/bin/bash

Adam

David Gibbs

Re: Logging into Photon.

Post by David Gibbs » Thu Jan 08, 2004 3:18 pm

Adam K Kirchhoff <adamk@thorn.ashke.com> wrote:
Wojtek Lerch <wojtek_l@yahoo.ca> wrote:
"Adam K Kirchhoff" <adamk@voicenet.com> wrote in message
news:btibq0$plh$1@inn.qnx.com...
Any Photon gurus want to take a stab at this?

How did you create the user -- -- did you use the passwd utility?

I didn't see an 'adduser' utility, so I added the user to the passwd
file, created the home directory, and then changed the passwd with
'passwd'.
passwd is, actually, the "adduser" utility. :)

passwd new_user_name will create the new user.
Could you post the user's line from /etc/passwd here?

adamk:*:501:501:Adam K Kirchhoff:/home/adamk:/usr/bin/bash
Just a guess -- try it with /bin/ksh as the shell.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Adam K Kirchhoff

Re: Logging into Photon.

Post by Adam K Kirchhoff » Thu Jan 08, 2004 4:06 pm

David Gibbs <dagibbs@qnx.com> wrote:
Adam K Kirchhoff <adamk@thorn.ashke.com> wrote:
Wojtek Lerch <wojtek_l@yahoo.ca> wrote:
"Adam K Kirchhoff" <adamk@voicenet.com> wrote in message
news:btibq0$plh$1@inn.qnx.com...
Any Photon gurus want to take a stab at this?

How did you create the user -- -- did you use the passwd utility?

I didn't see an 'adduser' utility, so I added the user to the passwd
file, created the home directory, and then changed the passwd with
'passwd'.

passwd is, actually, the "adduser" utility. :)

passwd new_user_name will create the new user.

Could you post the user's line from /etc/passwd here?

adamk:*:501:501:Adam K Kirchhoff:/home/adamk:/usr/bin/bash

Just a guess -- try it with /bin/ksh as the shell.
Hmmm... I'll give that a shot. I have tried /bin/sh as the shell.

If that files, I'll kill that entry from the passwd file and add it
using the passws command :-)

Adam

Wojtek Lerch

Re: Logging into Photon.

Post by Wojtek Lerch » Thu Jan 08, 2004 4:45 pm

Adam K Kirchhoff <adamk@thorn.ashke.com> wrote:
adamk:*:501:501:Adam K Kirchhoff:/home/adamk:/usr/bin/bash
Change the "*" to an "x".

Here's what the docs say about the syntax of the passwd file:

The /etc/passwd file contains the following fields, separated by
colons:

username:has_passwd:userid:groupid:misc:home_directory:initial_command

If the has_passwd field contains an x character, a password has been
defined for this user. If no character is present, no password has
been defined. Use of any other character is reserved and may cause
side-effects for the user.

Eric Johnson

Re: Logging into Photon.

Post by Eric Johnson » Thu Jan 08, 2004 5:05 pm

This excerpt from the work-in-progress QNX Neutrino User's Guide chapter on
managing user accounts might help with this problem :-)

--snip--
Text-mode login
When you log in via the login utility, login changes directory to your
HOME directory, sets your LOGNAME to your user name, and SHELL to the
login shell program named in your account. It then starts the login
shell program, which is typically a command interpreter (/bin/sh). The
login shell program could also be an application that gets directly
launched as soon as you log in.

Graphical login
When you log in via the Photon microGUI's phlogin utility, phlogin also
changes directory to your HOME directory and sets your LOGNAME and SHELL
environment variables according to your user name and your account's
login shell.

However, unlike the text-mode login, it doesn't start your login shell
program as an interactive program. Instead, it runs your login shell
with the arguments -c /usr/bin/ph. This puts you into the Photon desktop
environment as long as your login shell is a standard POSIX shell.
From the Photon desktop, you can choose to start a command-line
interpreter (i.e. shell) in a pterm window. This shell is the one
identified by the SHELL environment variable, which phlogin set to the
login shell identified in your user account entry when you logged in.

Warning: If your login shell is something other than /bin/sh or /bin/ksh,
you
might not be able to log in at all using phlogin. This also affects the
techniques described later in this chapter to disable user accounts
while they're being maintained.
--snip--


"Wojtek Lerch" <wojtek_l@yahoo.ca> wrote in message
news:btk1ep$gcr$1@nntp.qnx.com...
Adam K Kirchhoff <adamk@thorn.ashke.com> wrote:

adamk:*:501:501:Adam K Kirchhoff:/home/adamk:/usr/bin/bash

Change the "*" to an "x".

Here's what the docs say about the syntax of the passwd file:

The /etc/passwd file contains the following fields, separated by
colons:

username:has_passwd:userid:groupid:misc:home_directory:initial_command

If the has_passwd field contains an x character, a password has been
defined for this user. If no character is present, no password has
been defined. Use of any other character is reserved and may cause
side-effects for the user.

Wojtek Lerch

Re: Logging into Photon.

Post by Wojtek Lerch » Thu Jan 08, 2004 5:13 pm

Eric Johnson <eric@qnx.com> wrote:
This excerpt from the work-in-progress QNX Neutrino User's Guide chapter on
managing user accounts might help with this problem :-)

--snip--
Oh yeah, and there's this one from the phlogin docs page:


You can create a configuration file that specifies command line
arguments for your shell to run as a login shell. You might want to
do this if you require your .profile script to run, for example.
The configuration file must have the same name as the shell, and be
located in these folders, searched in this order:

1. ~/.ph/login/shells/
2. /etc/photon/login/shells/


The configuration file can contain any number of blank lines and
comments, followed by a single line of command-line arguments for
your shell, including argv[0]. Arguments must be separated by white
space. Lines starting with # are comments. The path to ph is
appended to the arguments. You can use a backslash to escape a white
space character, a backslash, or the # character. The default is:

- -c

For bash, I believe the correct line is

bash -l -c

Adam K Kirchhoff

Re: Logging into Photon.

Post by Adam K Kirchhoff » Thu Jan 08, 2004 6:06 pm

Eric Johnson <eric@qnx.com> wrote:
This excerpt from the work-in-progress QNX Neutrino User's Guide chapter on
managing user accounts might help with this problem :-)

--snip--
Text-mode login
When you log in via the login utility, login changes directory to your
HOME directory, sets your LOGNAME to your user name, and SHELL to the
login shell program named in your account. It then starts the login
shell program, which is typically a command interpreter (/bin/sh). The
login shell program could also be an application that gets directly
launched as soon as you log in.

Graphical login
When you log in via the Photon microGUI's phlogin utility, phlogin also
changes directory to your HOME directory and sets your LOGNAME and SHELL
environment variables according to your user name and your account's
login shell.

However, unlike the text-mode login, it doesn't start your login shell
program as an interactive program. Instead, it runs your login shell
with the arguments -c /usr/bin/ph. This puts you into the Photon desktop
environment as long as your login shell is a standard POSIX shell.
From the Photon desktop, you can choose to start a command-line
interpreter (i.e. shell) in a pterm window. This shell is the one
identified by the SHELL environment variable, which phlogin set to the
login shell identified in your user account entry when you logged in.

Warning: If your login shell is something other than /bin/sh or /bin/ksh,
you
might not be able to log in at all using phlogin. This also affects the
techniques described later in this chapter to disable user accounts
while they're being maintained.
Except that I tried /bin/sh :-) And it still didn't work for me :-(

Ada

Post Reply

Return to “qdn.public.qnxrtp.os”