You can't su to something with no login shell -- that's the entire point of that.
You can sudo to it, however, if your sysadmin has configured sudo to allow that for your user and the command in question. This just does a setuid without an actual login.
The error messages states that your user has no home directory, not no login shell.
In any case, even if the user has no home directory and assuming you have root's privileges, you need to avoid the "-" option which is meaningless in that case and you can simply run
If the user really has no shell, i.e. the last field of its passwd entry is empty, the OS is defaulting to the bourne shell (/usr/bin/sh). However, if the user has a specific shell specified, this shell will be run to execute the command, and will fail if it is not functional, e.g. /bin/false.
Guys please help me I have a linux class and I want to write a shell script who shows which user loged in and show the process that are active in his/her shell in another text file and email that file to root just when the user loged out
Thanks every bod (1 Reply)
I use plink.exe to automate remote commands that return data to Windows machines. This works well on newer servers running Red Hat since the commands were developed for bash and the designated user's login shell is bash. I need to also support older servers which are running Solaris 10 but the... (5 Replies)
I am sorry for creating a new topic after my previous inquiry was closed, but I tried and tried and I do not know how to edit my previous post. This is not exactly any homework, this is one of 40 questions we were expected to prepare for one of the labs. I searched and read what I could and still... (4 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am a root in a Unix system. My shell is bash.
2. Relevant commands, code, scripts, algorithms:
How to set... (1 Reply)
Hi Every body,
I would need a shell script program to login as different user and perform some copy commands in the script.
example: Supppose ora_toms is the active user
ora_toms should be able to run a script where user: ftptomsp pass: XXX should login through and run the commands
... (9 Replies)
Hey guys,
I have some task from my office to lock user on the specified directory after the user logged on using ssh. And then run prompt program to fill the required information. Yeah, just like an ATM system.
My question:
How could I do those?? AFAIK I have to edit the ~./bashrc. But the... (1 Reply)
Hi All,
I was reading a tutorial for Installing Tomcat on Linux machine.
(http://www.puschitz.com/InstallingTomcat.html)
Here the author had mentioned that: For security reasons I created a user account with no login shell for running the Tomcat server.
My question is:
1. What is a User... (6 Replies)
Hi all,
I Hope to find the answer.
I am new to aix 5L, I have one oracle 10gR2 database server run on ain 5L
so when I start my new Job I find that the operater login oracle user and run the backup_menu.sh, this menu is to make a backup of the database top disk and transfer it to tape,... (3 Replies)
Hi all,
I would need a script to run only at the first login of a newly created user. And at the first time only. I did some googlework but unfortunatly... I made up it possibly had something to do with the bashrc file.
This script is some kind of info for the user ; with the possiblity to... (1 Reply)