0

I already know that you can change the command executed for a specific user when he/she logs in. However, I do not know if you can have many start-up programs for the certain user. For example:

oqhax:x:1001:1001:Oqhax,,,:/home/oqhax:/bin/bash

The last section indicates the start-up program. Could you have more than one?

Thank-you

Kusalananda
  • 333,661
Oqhax
  • 103

1 Answers1

1

From man 5 passwd:

the program to run at login (if empty, use /bin/sh). If set to a non-existing executable, the user will be unable to login through login(1).

It doesn't say anything about running multiple programs, so no, you cannot put multiple programs there.

If you want to run multiple programs, you could conceivably create a script that runs the various programs, and use the script as the login shell. That said, I don't fully understand what you're trying to accomplish.

Andy Dalton
  • 13,993
  • True, we could write all the programs that you want to execute (or commands) in a single one, and then execute that one. Thanks. – Oqhax Mar 12 '18 at 18:07