![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX Desktop for Dummies Questions & Answers Questions regarding GNOME, KDE, CDE, Open Office, etc go here. All UNIX and Linux Newbies Welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to create an user | aemunathan | SUN Solaris | 5 | 05-28-2008 12:59 PM |
| How to create a user in HP-UX | Harikrishna | HP-UX | 3 | 02-08-2008 07:31 AM |
| create user | magasem | HP-UX | 2 | 10-09-2006 05:50 PM |
| I create user but i cant login the user i created. | jerome | UNIX for Dummies Questions & Answers | 5 | 06-09-2006 02:08 PM |
| Other than root user .Normal user is unable to create files | mallesh | UNIX for Advanced & Expert Users | 1 | 06-22-2005 09:18 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
who you can't log in as, but you can su over to them once you get on.
I am aware of how to make a no login user by using /NOSHELL in the spot for the shell in the passwd file, but my question is if I do that and then get on the box as a user who I can log in as and "su -" over to the nologin user when I hit his environment and it reads the variables to set it up will it see that and not let me log in as them or will it work out OK? I realize if I "su" to them I just get theri permissions, but if I need to also use their environment (ie "su -") then what do I do? Any help is appreciated, Thanks in advance, New_Guru |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You shouldnt have any problems su'ing over to a nologin user. its up to you whether you want to carry over your profile depending on how you su with or without the "-".
It is fairly straightforward. there shouldnt be any issues.
__________________
My brain is your brain |
|
#3
|
|||
|
|||
|
I thought that may be the case. In my particular situation I am taking a user that already exists and removing the ability to log in as that user. I just wanted to be sure before I did it because the user whos login ability is going away is the owner of a lot of files and software on my system. If I do this and it causes the system to not be able to run things I would be in trouble.
Thanks for the info, New_Guru |
|
#4
|
|||
|
|||
|
I used the "/NOSHELL" value in the passwd file where the shell variable is supposed to be. When I try to "su" or "su -" over to that user and it says, "su: No shell" and will not let me.
So I will state my question again unless I was not clear before. I need to change an existing user lets call him user #1 (who owns a lot of software and scripts I can not break the usability of) from a user you log onto the system as to a user you cannot log on as anymore. I want to be able to log on as a different user (lets say user #2) and then "su" or "su -" over to the user #1 who I can no longer log on as. Thanks again in advance, New_Guru |
|
#5
|
||||
|
||||
|
Try setting the user's shell to /bin/nologin. That should help.
|
|
#6
|
||||
|
||||
|
why not give the "nologin" user ksh as the login shell and put code in $HOME/.profile to check for whether $LOGNAME correspond to the "who am i" output? if yes, exit out ... if no, proceed ... (change $LOGNAME and "who am i" as appropriate for your OS) ...
Code:
ME=$(who am i | awk '{print $1}')
if [ "$LOGNAME" = "$ME" ]
then
echo "Login not allowed"
exit
fi
|
||||
| Google The UNIX and Linux Forums |