LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-08-2003, 09:38 PM   #1
chrismiceli
Member
 
Registered: Aug 2002
Posts: 349

Rep: Reputation: 31
echo


i want to mount a network user on boot in rc.local that works fine but i don't want it to show
Code:
INFO: Debug class all level = 2   (pid 1095 from pid 1095)
added interface ip=192.168.1.107 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.103 ( 192.168.1.103 )
I want it to show something like setting up network. Is it going to be something like this plz help
Code:
echo -n Setting up network
mount -t smbfs -o password= //Joshua/JOSH\ C /mnt/josh
 
Old 04-08-2003, 09:46 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
All you need to do is redirect the output of mount
to either a logfile or the /dev/null device :}

Code:
echo "Mounting SMB filesystem..."
mount -t smbfs -o password= //Joshua/JOSH\ C /mnt/josh > /dev/null 2>&1
Cheers,
Tink
 
Old 04-09-2003, 02:02 PM   #3
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
If you are doing it in rc.local just for the visual effect ( the echo ) disregard. I would the drive to my /etc/fstab as an smbfs filesystem and pass the username and password options. That way the mount -a in the startup scripts will cover for you.
 
Old 04-09-2003, 02:39 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
If you want users to be able to mount
devices /etc/fstab has to be world-readable
and would display the passwords to anyone

rc.local, however, can be made rwx------
without any worries, which is why I believe
that his approach is the more sensible ;)

Cheers,
Tink (security fanatic)
 
Old 04-09-2003, 05:25 PM   #5
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
I was thinking along the same lines, but assumed that one may want to rwx------ /etc/fstab as well.

I have removed suid from most commands -- mount specifically -- on my way to total sudoers based execution for normally setuid programs ( except ping, hehe ). I think the fstab is more elegant if it works in one's specific case / suits one's personal taste. If you specify the user/users option in fstab and suid mount, anyone can mount that specific device. Whereas if you go the sudo way only the people I choose can mount devices. Of course they can mount/umount whatever they 're in the mood for.

In other words, if I want regular users a and b to be able to mount device x, but not c -- and I want a and b to be able to all devices, again not c -- this is the only way I can get where I want. Suggestions welcome.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Echo onelung02 Slackware 6 08-26-2005 04:50 PM
Kphone echo (echo echo) scabies Linux - Software 0 10-18-2004 02:59 PM
echo phoeniXflame Linux - Software 3 03-02-2003 08:23 PM
Echo /devPrinting doesn't work, echo /usb/lp0 works, Testpage works, Printing doesn't Hegemon Linux - General 3 08-15-2002 01:13 PM
Echo linux_freak Linux - General 1 06-05-2001 02:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration