Programming :: Finding The Username Of A User Who Has Logged In (roaming Profile)
Mar 14, 2011
I want to be able to create a php webpage that will show the logged in users files and how full their home directory is (roaming profiles). The php side isn't a problem....the problem is how do i determine the username of the user who is logged into Linux not the webpage itself?
What i want is when the user opens this page, it knows who they are already. I have seen this done on an intranet at work (don't know what OS it is running on tho) where I login to the network, view the page and it says my name.
View 6 Replies
ADVERTISEMENT
Jan 14, 2011
i am using putty to connect to the linux server and i am using nano as my text editor to write a bash script.
this is my script:
echo "Please enter your Username"
read userName
userName= grep $USER /etc/passwd | cut -d: -f5
echo "Welcome " $userName | cat >> output.txt
the problem i have is that when i enter my username, the output (my real name) does not display in the output.txt. instead it displays in putty. so when i run my script in putty it shows the message to enter username and after i enter my username my real name appears below it. i want it to show in the output.txt
View 1 Replies
View Related
Jan 21, 2010
i m working on roaming profile where linux is the server & windows is the client... i m implementing it using samba as pdc my linux version is 2.6.27.5-117.fc10.x86_64 but my samba server is not working windows is not authenticating my domain name following is the copy of my smb.conf file
Quote:
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
[code].....
View 52 Replies
View Related
Jan 20, 2009
I use tomcat as my server platform in Ubuntu for a war file. I know in order to get real time information about how many user are logged in, we can count how many active sessions exist by a SessionCounter code. However, I have to permit HttpSessionListener in web.xml of tomcat. From other users' experiences, the configuration is complexed and has some errors.
Here's the link:
[URL]
In order to get users'ip, in jsp, use request.getremotehost() or request.getremoteaddress() by editing the jsp file. I wonder if there's some open source software to use for these two purposes.
View 1 Replies
View Related
Mar 3, 2010
I'm trying to setup a Ubuntu workstation in a corporate environment, right now just as a proof of concept but hopefully soon I will do the real thing. The problem is trying to establish a Linux equivalent of a roaming profile. The user logs into the Ubuntu Machine using their Windows Active Directory Credentials. (A big victory) Then I would like the client to mount their /home folder off of a Windows 2008 Small Business Server. So far I can make Ubuntu mount everyone's /home folders but I would like to narrow it down to only mount the specific user who has logged in and with proper permissions.
Mount the proper /home folder from the server with that users permissions so they are the owner, have full access etc. Only Mount the current users folder. Or any logged on etc. (I just don't want to mount every folder for every user that exists in Active Directory) Do it automagically.
I login as "dirtandgas est" (dirtandgas is our test domain) and here is the line from the FSTAB that's used to mount the directory.
Code:
//server/redirectedfolders /home/DIRTANDGAS cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode0777,dir_mode0777,rw,uid=892863608 0 0
Now I know if I changed that to the following, it would only mount the one directory, but I don't want to have to maintain the FSTAB on each computer for each user. (the point of using active directory)
[Code]....
View 4 Replies
View Related
Jul 12, 2010
How can I (as admin) find out when a certain user e.g. "karl" most recently logged in and most recently logged out of a system?
View 2 Replies
View Related
Oct 28, 2009
how to get the username logged in a given IP in a network?
View 1 Replies
View Related
May 18, 2011
Since today the keyboard doesn't work. I can input username and password but after logged in I can't work with the keyboard. It seems locked. The mouse works correctly. If I boot with Windows the keyboard works correctly.
View 2 Replies
View Related
Feb 16, 2010
Whenever I want to shut down, I have to enter my password, because shutting down while other users are logged in is a privileged operation. Now, I couldn't download an update because the update lock was in use. I'd be surprised if someone had targeted my system, especially because I didn't install any obscure .debs or anything recently, but I'd really like to find out if it's been compromised somehow. Say, by obtaining an overview of all users currently logged into my system or something. Is that possible?
View 2 Replies
View Related
Feb 16, 2010
what is the correct way/procedure to re-create a user home directory. For instance, on a Mac/Windows machine, i would just rename the existing user profile [home dir], and then just log back in as the user - job done. On OpenSuse/Linux, it seems it does not work that way..?! When i try to rename my home folder to say me.old via root, and log back in as me, i get all kinds of errors. Opensuse does create a new home dir, but it appears not properly.
View 9 Replies
View Related
Dec 11, 2009
I am using the sudo command to log on locally as another user by the following command:
sudo -u theotheruser -s
or
sudo -u theotheruser sh
As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.
View 11 Replies
View Related
Aug 8, 2010
I have a network set up that has been working for around a year with no problems but has now developed a login problem. The system was set up with a main server with all users on it and another PC located elsewhere that people could log onto using there personal login and password that then gained access to the account on the main server. This remote PC has now got the problem. When you try to log onto an account it comes up with the message "your session has lasted less than 10 seconds. If you have not logged out yourself this could mean there is a installation problem or that you are out of disk space."
Error message says that no profile for the user can be found and it couldnt create per-user gnome configuration directory. I can log on as root onto the remote PC as it is obviously a local account but all the account on the main server are not accessible. From the root account I can see that the connection to the server is OK and I can actually log into the accounts on the server using the failsafe session so the physical network is OK.
I never built or designed this set up and to be honest I normally work with windows so its all a bit strange to me. Both PC's run Centos 5. I have checked the messages log and there doesnt seem to be any indication of a problem. Just that it stopped connecting from the remote PC. The accounts are all active on the main server itself and have no problems being accessed.
View 3 Replies
View Related
Feb 17, 2011
I am working on different versions of Ubuntu & I looking for a script that will prompt the user to enter the host name & user name that he wanted for that system at initial boot up.
View 2 Replies
View Related
May 5, 2010
I am trying to login to a redhat server via VNC. This used to work until I reloaded the box. Although I had previously logged in directly to the box, then I could vnc to it remotely. The service is running, netstat states the ports are open and listening.I can ssh to the box, and ran the usual commands to start the services.So my question is. Do I need to have a local user logged in before I can VNC, if so how can I do that via the command line.If this is not required for a local user to be logged in, what am I missing. Other than VNC, which other services do I need to start.
View 7 Replies
View Related
Jun 12, 2011
I want to give root access to someone for remote management but I want to see whatever they are typing. Can I use screen for that?
Do I have to tell them to use screen as well? or can I simply pry on the session?
View 6 Replies
View Related
Jul 7, 2010
I've been using Ubuntu with GNOME for the past few years and I'm looking at possibly switching to the KDE-based Kubuntu. I know I can have both DE's on my system and even found a tutorial on the Psychocats site for setting it up, but I have a question for the KDE gurus here. Can I safely use the same user profile between both GNOME and KDE or should I set up a new user for working in KDE? I haven't seen anything saying I can't but I really don't want to hose my GNOME settings in case I end up not liking KDE enough to use it on a daily basis.
View 9 Replies
View Related
Aug 26, 2010
I am just started to setting up a samba PDC at our office.MY problem is my xp client is logging in to server but not loading the profile.its booting with tmp profile and whatever the changes I do in that profile.its not updating that in the server. And my client.log file is showing following error. '/home/user4' does not exist or permission denied when connecting to [user4] Error was Permission denied. I gave full right to /home/user4.But still its giving this error. User4 is given same password for linux and samba. How can I add a profile of user to smb pdc?
RHEL 5.0
Samba version is 3
View 1 Replies
View Related
Sep 3, 2010
How to add a new role and profile for new user by using the command "useradd" in linux.In solaris there is an options(useradd -R and useradd -P) for these actions, like this how to add role and profile for new user in linux.
View 3 Replies
View Related
Mar 4, 2011
I recently installed FC14 as my server and is able to ssh and vnc into the server when locally logged in. If i logged out (at login screen) then i cant ssh or vnc into the server. It is pointless to have a server if i am not able to remote in via ssh and vnc.
View 7 Replies
View Related
Jun 16, 2011
I have recently installed Opensuse 11.4 on my desktop. And also upgraded my gnome-2 to gnome-3. Its works nice and I am enjoying it. Only the biggest problem I am facing is, if I lock the screen and leave my desk for couple of hours then user gets logged out automatically. Which is resulting all the documents and applications gets closed. I am unable to work in my desktop now.
View 5 Replies
View Related
Mar 30, 2010
How come you can shut down or reboot from the gui w/o needing root privelages, but if I enter "shutdown -h now" on the command line I am met with "shutdown: Need to be root".
Also- somewhat unrelated to my first question- I recall when I first started Ubuntu-ing, if I wanted to shut down or reboot while another user was logged in, I'd need to enter my password- but it doesn't do that anymore. Two users can be logged in with multiple applications open, and if I reboot or shutdown, it just goes for it? (using 9.04, for now...)
View 2 Replies
View Related
Jul 5, 2010
when I log in, I can move the mouse, but nothing else. The whole user interface is unresponsive and absolutely no keystroke works. It is probably not because of my hardware (hp 2710p) because logging in as root (with only slightly different Gnome configuration) does work well. I assume it is because of some error inside the Gconf. There is always an error when starting Gnome that an entry could not be read, including some bunches of ~30 question marks. If it is useful, I can give you the whole message literally.
I haven't changed data inside Gconf, but I did have it open when I was installing a program, and then the console did show the message with the question marks for the first time (while processing some "trigger" post-install). I think the program I was installing was drapes (for changing desktop wallpapers in Gnome). Strangely Gnome did startup correctly afterwards for a couple of times (always showing the above-mentioned error). I have no idea what change made it suddenly stop working yesterday.
The differences in Gnome configuration between the working root and the unresponsive user account are, as far as I can tell from memory: changed theme (elegant-brit), wallpaper, fonts, globalmenu in the panel, installed - added to panel - uninstalled drapes.The rest is the same for the root account. I can still log in to the shell as the normal user, but "startx" leads to the disabled graphical interface. As I said, the graphical interface works well when I use the root shell. I can't access the internet from the user shell unfortunately (if I need to, I will figure out how to set up wlan in the shell).
View 1 Replies
View Related
Jul 19, 2010
I have a very annoying problem with my Lucid (installed with ubuntustudio's alternate dvd). Two out of four times when I log in my account has some restrictions. I can't mount devices on nautilus and the shutdown button won't be displayed. If I log out and log in I see the restrictions again. Only restarting (with "sudo shutdown -r now" or so) may give me a normal session. On the console works everything normal. I mean i can sudo with my password.
View 2 Replies
View Related
Nov 24, 2009
I am running a mail server with combination of dovecot,sendmail and squirremail as web client. I want to change the password of the user if he/she not logged in for 21 days.
View 4 Replies
View Related
Mar 20, 2010
I appear to be experiencing an annoying issue with my soundcard. As you can see from the images below, the soundcard is detected, but not when it comes to the "output". This is only affecting one user (my admin account is fine, as was a new user set up to test it).
I've looked at this page and have attempted reinstalling alsa, but to no success.
The results from aplay -l are:
Quote:
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC883 Analog [ALC883 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
[Code]....
"stevek" being the user that I'm having difficulty with. I suspect that I might need to recreate part of my user profile, but I'm not sure where start.
View 1 Replies
View Related
Jul 25, 2011
Setting up a small network for a private school. have ubuntu on the systems, but wanting to make user profiles that anyone can access and have admin profile that only I can access. that part was easy, but am trying to find out how on the all user profile I can block certain things out like media players and etc. I figured out how to hide them in the task bar but anyone with a little tinkering could find them. Anyway to remove certain things completely on all user prof>? How to Remove.
View 1 Replies
View Related
Jun 29, 2011
on my netbook I've tried to make possible for my user to shutdown without needing a password. battery could run low when I'm not in front of it. Editing sudoers has allowed my user to shutdown the system, but Gnome still prompts me for the root password whenever root is logged in too. That's usually the case, because to avoid entering the root password multiple times whenever I need elevated privileges and not wanting to cache the root password, I keep a Root Terminal always open.
View 6 Replies
View Related
Apr 15, 2010
I'm looking for a user-friendly way to change the password of a user that is *not* currently logged into the machine. We have a machine that is used by a number of users with a low level of tech savvy. The machine gets logged in as a generic user which works for most purposes, but due to a management requirement, we need Firefox to be run under an account set up for the individual user. I've gotten that bit to work fine, but what I can't figure out is a friendly (GUI) way to allow users to change their own password while the machine is logged in as the generic user. I would like to use gnome-passwd, but I've been unable to figure out how to get it to run for a user other than the logged-in generic user.
View 7 Replies
View Related
Jan 31, 2010
some days back i have installed VLC player. It is working fine when logged in as any other user than root user but not when logged in as root user.
View 2 Replies
View Related
Jul 13, 2011
Is possible to send a message (popup window or something) to local user logged into X (xdm, fluxbox) from console ? For example: user1 is logged and using X/fluxbox, user2 logging into the same box by ssh to console. Now - what user2 have to do to send message to user1 ?
View 1 Replies
View Related