Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using 'su -u exg85' would require the password for exg85.
Can you log in as exg85 normally? This is very strange. Do you have something like pam, selinux, or sssd/winbind that is stopping users from logging into other users?
Last edited by szboardstretcher; 12-13-2016 at 02:02 PM.
@szboardstretcher.......... it asks for a password, but when I put in both the password for 'oracle' and 'exg85' it says incorrect password. I typed them in VERY SLOOOOOOOOWLY too! 8.))
OK, was unaware you don't have root's password. Try this instead;
Code:
su - exg85 -c 'command'
This will ask for exg85's password before it is run.
I used my EXACT password for logging in as 'exg85' in linux AND the password for 'exg85' in Win
It can depend on the setting in /etc/pam.d/su resp. su-l and login. Are these different?
You are not root, but could root setup a special case for you: there can several options be configured for sudo (i.e. in /etc/sudoers.d/somefile) which allows to execute just exactly one command as a different user, and only as this user. Or even switch the user automatically when user A issues sudo fubar and it will run always as user B - no password, as long as the actual commandline matches the coded one in /etc/sudoers.d/somefile (use absolute paths to avoid any other behavior). Also an email can always be send if this sudo case is used.
I used my EXACT password for logging in as 'exg85' in linux AND the password for 'exg85' in Win
If you run the command as yourself does it work? I mean log in as yourself, not oracle, and run the command. I'm trying to see where the disconnect is as on my system it works and I can run a command as any other user from my personal account.
Insecure,yes. I plan on changing the permissions of the script.I appreciate everyone's help. Yes, the admins didn't really address the permissions issue and I apologize to everyone for that. This is a great forum with great people and I hope nobody feels unappreciated!
I used this method before and it seems to work good
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.